From 8ddd96b70acc3d5be194204b4a84d828d5289c64 Mon Sep 17 00:00:00 2001 From: Niels V Date: Wed, 26 Mar 2025 13:56:51 +0100 Subject: [PATCH] always run npm install Since we merge the template package.json into the services package.json the existing package-lock.json of the service will never match with the package-lock.json of the service. As such there is no use in trying to do a npm ci, since npm will always fail with ``` npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing. ``` --- npm-install-dependencies.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/npm-install-dependencies.sh b/npm-install-dependencies.sh index 71f25e1..dc6e794 100755 --- a/npm-install-dependencies.sh +++ b/npm-install-dependencies.sh @@ -2,14 +2,8 @@ cd /usr/src/app/app/ if [ -f "/usr/src/app/app/package.json" ] then - if [[ "$1" == "production" ]] && [ -f "/usr/src/app/app/package-lock.json" ] - then - echo "Installing dependencies in ci mode" - npm ci - else - echo "Installing dependencies from package.json" - npm install - fi + echo "Installing dependencies from package.json" + npm install fi mkdir -p /usr/src/app/app/node_modules/