Friday 31 May 2019

npm ci significantly slower than npm install

I recently switched to using npm ci instead of npm install when testing my system. I used time ./my-script.sh to see how long it takes to build the project and get it running. Running a single npm install seems to be slower than running a single npm ci, but my script (which has to run npm ci/npm install few different directories) is on average 20 to 30 seconds slower if it uses npm ci. Isn't it supposed to be much faster? How can I improve the speed?Also, having to use multiple installs might be bad practice (there are several package.json/package-lock.json files and node_modules folders), but it seems necessary due to the amount of subprojects and subsystems within this one. I'm pretty new to this, but I don't know how I could make it so you can just run npm ci once in the root directory to take care of all of them.I'm probably going to use Yarn later, but I'm not sure why I'm having this issue now. Any ideas?

Submitted May 31, 2019 at 04:09PM by CronosDage

No comments:

Post a Comment