Error AtlasError Documentation and Resolution

npm EACCES permissions error during global install

EACCES: permission denied

npm reports EACCES during global installs when npm writes into directories owned by the system instead of the current user.

EACCES permissions errorinstallation
EACCES: permission denied
  • Global npm packages are installed into a directory the current user cannot write to.
  • Node.js and npm were installed in a way that requires elevated permissions for global installs.
  • The current shell PATH and npm prefix configuration do not match a user-writable setup.
  1. Use a Node version manager to reinstall Node.js and npm.
  2. Or change npm's default directory to a user-owned location and update PATH accordingly.
  3. Retry the global install without sudo after reconfiguring npm.
npm Docs: Resolving EACCES permissions errors when installing packages globally
npm EACCES permissions error: causes and fixes | Error Atlas