I am logged in with my local acccount, I even sudoed to that account with SSH.
I tried to install Bower with the following command:
npm install -g bower
and I get this error:
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules /usr/local/lib └── email@example.com npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "bower" npm ERR! node v6.3.1 npm ERR! npm v3.10.3 npm ERR! path /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! at Error (native)
The error is pretty obvious, I have 2 questions:
- Why does it happen with my local super admin account?
- How can I fix this?