I am trying to set up Node.js and NPM on a Ubuntu 14.04 machine but am having some trouble. On my first try I kept getting
The problem that throws an EACCES is often a permissions issue on two folders:
There could be a permissions problem on your ~/.npm directory.
The full path to your '~/.npm' directory is '/Users/YOUR_USERNAME/.npm'; it stores various npm functionality. The easiest way to get to your home directory on a unix based system (I believe on linux as well) is to type 'cd'.
There could also a permissions problem on your /usr/local/lib/node_modules.
This is where npm tries to store your globally installed modules. It is the system level version of the 'node_modules' folder you find in basically any node.js project you make and install with dependencies.
I actually made a node package that will resolve this issue on a mac, although I'm not sure about Linux (because the paths to '.npm' and 'node_modules' may be different on linux), you could give it a shot? It basically reasserts you as the owner of those directories.
Here's the github page:
https://github.com/yvanscher/fixmynode (just a quick note this package might be out of date because of a weird build issue with the osenv dependency)
If you reinstall node you could try to change the permissions yourself with these commands (which should work in Linux):
sudo chown -R
sudo chown -R
NOTE: I'm not 100% sure that the paths '/usr/local/lib/node_modules' and '~/.npm' are correct for a Linux based Node/npm install. Can you post the full error message you get in the terminal?