Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When install using install command with package-lock
config disabled, the npm will still prune packages automatically and remove packages that did not appears in package-lock.json
Expected Behavior
According to the document https://docs.npmjs.com/cli/v7/using-npm/config#package-lock , the automatically pruning should be disabled when package-lock
config is disabled
Steps To Reproduce
- Open shell in an empty folder
- Run
npm install --no-save --package-lock false lodash
- The
lodash
module will be installed in thenode_modules
folder in the cwd folder, and package-lock.json is not created - Run
npm install --no-save --package-lock false underscore
- The
underscore
module will be installed, but thelodash
module is removed
Environment
- OS: Windows 10
- Node: 16.10.0
- npm: 8.1.0