-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
Current Behavior:
npm update --no-save --dev removes dependencies from the node_modules folder.
Also, the documentation states that As with all commands that install packages, the --dev flag will cause devDependencies to be processed as well. but I can't find the --dev flag in any other part of the documentation. Shouldn't it be --save-dev instead?
Expected Behavior:
npm update --no-save --dev should update all dependencies (including dev dependencies) and NOT remove dependencies from the node_modules folder.
Steps To Reproduce:
I have a package.json with the some dev dependency:
"devDependencies": {
"some-dependency": "latest",
...
}When I run npm update --no-save --dev my dev depdency sometimes gets updated, but sometimes it just completely dissapears from the node_modules folder.
Every subsequent run results in the package being there or not being there:
- npm update --no-save --dev => package is there
- npm update --no-save --dev => package is no longer there
- npm update --no-save --dev => package is there again
- npm update --no-save --dev => package is again no longer there
- npm update --no-save --dev => package is there again
- npm update --no-save --dev => package is again no longer there
- ...
Environment:
- OS: Windows 10
- Node: v10.16.0
- npm: 6.9.0