Closed
Description
Current Behavior:
If I install a package using the --no-save
option, it is not removed from node_modules/
upon its uninstallation.
Expected Behavior:
If I install a package using the --no-save
option, it should get removed from node_modules/
upon its uninstallation.
NB: this is also how npm 6 behaves.
Steps To Reproduce:
- Run the following
cd $(mktemp -d)
mkdir node_modules
npm i q --no-save
npm un q --no-save
- Observe that
node_modules/q
still exists.
Omitting the --no-save
option for the uninstallation command yields the same result. Substituting mkdir node_modules
with npm init --yes
makes no difference either.
Environment:
- OS: Ubuntu
18.04.5
&19.10
- Node:
12.19.0
&15.4.0
- npm:
7.0.15
&7.1.1