npm-ci
Is there a way of making “npm ci” install devDependencies, or “npm install” not update package-lock.json?
npm ci does install both dependecies and dev dependencies. But if you use npm ci –production or if your NODE_ENV is set to production, then it avoids installing dev dependencies. Please check docs here. With the –production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in … Read more
npm: When to use `–force` and `–legacy-peer-deps`
In the new version of npm (v7), by default, npm install will fail when it encounters conflicting peerDependencies. It was not like that before. Take a look here for more info about peer dependencies in npm v7. The differences between the two are below – –legacy-peer-deps: ignore all peerDependencies when installing, in the style of … Read more
What is the difference between “npm install” and “npm ci”?
From the official documentation for npm ci: In short, the main differences between using npm install and npm ci are: The project must have an existing package-lock.json or npm-shrinkwrap.json. If dependencies in the package lock do not match those in package.json, npm ci will exit with an error, instead of updating the package lock. npm … Read more