What / Why
If a project has a devDependency that itself has a shrinkwrap, then the devDependency's dependencies will be installed
When
How
npm install --only=prod
Current Behavior
devDependencies get installed
Steps to Reproduce
- npm init
- npm install polymer-cli --save-dev
- rm -rf node_modules
- npm install --only=prod
Expected Behavior
polymer-cli is a devDependency, as such nothing should be installed
This issue has been spotted because polymer-cli has vulnerable dependencies spotted by retirejs. The --production (or --only=prod) seems to work if the devDependency does not have a shrinkwrap file. npm ci --production works as expected and bypasses the devDependencies entirely
What / Why
If a project has a devDependency that itself has a shrinkwrap, then the devDependency's dependencies will be installed
When
How
npm install --only=prod
Current Behavior
devDependencies get installed
Steps to Reproduce
Expected Behavior
polymer-cli is a devDependency, as such nothing should be installed
This issue has been spotted because polymer-cli has vulnerable dependencies spotted by retirejs. The --production (or --only=prod) seems to work if the devDependency does not have a shrinkwrap file.
npm ci --productionworks as expected and bypasses the devDependencies entirely