npm

EACCES: permission denied

EACCES: Permission Denied

The process doesn't have permission to access a file or directory.

Common Causes

Fixes

  1. 1. Fix ownership
    sudo chown -R $USER:$USER .
  2. 2. Use nvm to avoid global installs
    nvm install 20
    nvm use 20
  3. 3. Use npm config prefix
    mkdir ~/.npm-global
    npm config set prefix '~/.npm-global'

Still not fixed?

Related Errors

DuskTools That Might Help

All Errors