You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] npm uninstall <name>@<version> neither executes nor fails #9880
This is not just a request to bump a dependency for a CVE
This is not solely a request to bump a dependency for a CVE
Current Behavior
Incorrectly attempting to uninstall a package using npm uninstall <name>@<version> neither fails, nor uninstalls:
$ npm uninstall vite@8.2.1up to date, audited 16 packages in 2s8 packages are looking for funding run `npm fund` for detailsfound 0 vulnerabilities
$ npm lstmp.Uwe8XKve3h@ /tmp/tmp.Uwe8XKve3h└── vite@8.2.1
Expected Behavior
If an attempt is made to uninstall a package using npm uninstall <name>@<version> either:
the command should fail with a syntax error or similar OR
the <version> should be ignored and the uninstall command should use only the package <name> to uninstall
Steps To Reproduce
cd$(mktemp -d)
npm install vite@8
npm uninstall vite@8
npm ls
Environment
npm: 12.0.2
Node.js: 26.7.0
OS Name: Ubuntu 24.04.4 LTS
npm config:
; node bin location = /home/mike/n/bin/node; node version = v26.7.0; npm local prefix = /tmp/tmp.Uwe8XKve3h; npm version = 12.0.2; cwd = /tmp/tmp.Uwe8XKve3h; HOME = /home/mike; Run `npm config ls -l` to show all defaults.
Activity
fix(arborist): reject uninstall args that carry a version (npm#9881)