Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm ci --dry-run deletes node_modules contents.
Expected Behavior
Using the --dry-run flag should not delete the contents of node_modules.
Context: See issue #2524 which was closed by @darcyclarke due to it not being able to be replicated in npm 7. However, it has not been reopened despite someone commenting over a year ago that it was still an issue in 9.2.0. It is still an issue for me in 10.4.0, so I am creating an issue for the current version to get eyes on it again.
Steps To Reproduce
npm init -y
npm install redis (or whatever)
npm ci --dry-run
ls -la node_modules
(I would expect the output of step 4 to still list the packages installed in step 2)
Environment
- npm: 10.4.0
- Node.js: 20.10.0
- OS Name: Windows 10 (but using node/npm in Ubuntu 22.04 in WSL)
- System Model Name: Microsoft Surface Laptop 3
- npm config:
; node bin location = /home/me/.nvm/versions/node/v20.10.0/bin/node
; node version = v20.10.0
; npm local prefix = /home/me/code/npmtest
; npm version = 10.4.0
; cwd = /home/me/code/npmtest
; HOME = /home/me
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm ci --dry-run deletes node_modules contents.
Expected Behavior
Using the --dry-run flag should not delete the contents of node_modules.
Context: See issue #2524 which was closed by @darcyclarke due to it not being able to be replicated in npm 7. However, it has not been reopened despite someone commenting over a year ago that it was still an issue in 9.2.0. It is still an issue for me in 10.4.0, so I am creating an issue for the current version to get eyes on it again.
Steps To Reproduce
npm init -ynpm install redis(or whatever)npm ci --dry-runls -la node_modules(I would expect the output of step 4 to still list the packages installed in step 2)
Environment