-
Notifications
You must be signed in to change notification settings - Fork 4.3k
[BUG] uninstall does not remove --no-save installed package from node_modules #2309
Copy link
Copy link
Closed
npm/arborist
#194Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 releasesemver:patchsemver patch level for changessemver patch level for changes
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/qstill 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 releasesemver:patchsemver patch level for changessemver patch level for changes