From 2087a2e5643db249db78df8b6f6cc3cd13f96908 Mon Sep 17 00:00:00 2001 From: muxator Date: Mon, 27 Apr 2020 00:33:19 +0200 Subject: [PATCH] startup: use "npm ci" instead of "npm install" in startup scripts Advantages: - reproducible install: every user will have the same, exact install, instead of a slightly different one - speed: installation of dependencies is measurably faster - explicit: if a user setup is broken, from now on he'll have a clear error message Fixes #3778 --- bin/installDeps.sh | 2 +- bin/installOnWindows.bat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/installDeps.sh b/bin/installDeps.sh index 50310d9a1..cac279e11 100755 --- a/bin/installDeps.sh +++ b/bin/installDeps.sh @@ -100,7 +100,7 @@ echo "Ensure that all dependencies are up to date... If this is the first time cd node_modules [ -e ep_etherpad-lite ] || ln -s ../src ep_etherpad-lite cd ep_etherpad-lite - npm install --save --loglevel warn + npm ci ) || { rm -rf src/node_modules exit 1 diff --git a/bin/installOnWindows.bat b/bin/installOnWindows.bat index 75982aaff..3c6bf58c0 100644 --- a/bin/installOnWindows.bat +++ b/bin/installOnWindows.bat @@ -14,7 +14,7 @@ cd /D node_modules mklink /D "ep_etherpad-lite" "..\src" cd /D "ep_etherpad-lite" -cmd /C npm install --loglevel warn || exit /B 1 +cmd /C npm ci || exit /B 1 cd /D "%~dp0\.."