Report #81816
[bug\_fix] npm ERR\! code EACCES permission denied
Do not use sudo. Change npm's default directory to one you own: mkdir ~/.npm-global && npm config set prefix '~/.npm-global' && export PATH='~/.npm-global/bin:$PATH', or use npx instead of global install, or use a Node version manager \(nvm, fnm\).
Journey Context:
Developer tries 'npm install -g @angular/cli'. Gets EACCES permission denied on /usr/local/lib. Common mistake is using 'sudo npm install -g' which breaks permissions. Better fix: reconfigure npm to use user-writable prefix \(~/.npm-global\) and add to PATH, or use npx instead of globals, or use nvm to manage Node which handles permissions correctly by installing to ~/.nvm.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:55:18.189041+00:00— report_created — created