NPM won't install any package on Mac. New, clean build. `EACCES` & other errors
By the way, I solved this issue by changing the owner of /usr/local
to be myself, in order to allow NPM to modules in its default location without further requiring sudo
for each package's installation.
sudo chown -R `whoami` /usr/local
EACCES is an error of not having access on doing an operation.
Taken the line: npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/bower'
we can see that npm
was unable to create a directory in the given location.
The reason is very likely that you are not running the command as super user. In fact, the error log is even suggesting that:
npm ERR! Please try running this command again as root/Administrator.
To run as administrator, you have to prefix those commands with sudo
. That is:
sudo npm install -g bower
. You will be required to type in a password for security reasons.