Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty output from npm commands #401

Open
mcandre opened this issue Sep 26, 2024 · 0 comments
Open

empty output from npm commands #401

mcandre opened this issue Sep 26, 2024 · 0 comments

Comments

@mcandre
Copy link

mcandre commented Sep 26, 2024

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.

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.
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant