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
When I try common Internet shell snippets to quickly delete all my (global) NPM packages, then npm becomes corrupted. Commands like npm install [-g] and npm ls [-g] no longer produce any output, though they do quietly emit non-zero exit codes.
npm commands should not fail quietly, but always emit an error trace (to stderr). Between asdf-nodejs, plain NPM, and the questionable behavior of dozens of these snippets, not sure where the root cause of the NPM corruption lies.
NPM should implement a built-in command to automate deleting all packages. The fact that we have so many (failed) attempts by users to write portable, awk hacks to do this demonstrates the need for a built-in feature.
As a workaround, I am using asdf uninstall nodejs <version>, asdf install (from .tool-versions) to fix the corruption.
The text was updated successfully, but these errors were encountered:
When I try common Internet shell snippets to quickly delete all my (global) NPM packages, then
npm
becomes corrupted. Commands likenpm install [-g]
andnpm ls [-g]
no longer produce any output, though they do quietly emit non-zero exit codes.https://stackoverflow.com/questions/9283472/command-to-remove-all-npm-modules-globally
npm
commands should not fail quietly, but always emit an error trace (to stderr). Between asdf-nodejs, plain NPM, and the questionable behavior of dozens of these snippets, not sure where the root cause of the NPM corruption lies.As a workaround, I am using
asdf uninstall nodejs <version>
,asdf install
(from.tool-versions
) to fix the corruption.The text was updated successfully, but these errors were encountered: