Blog Post

npm Installation fails with checkPermissions Missing write access

Thursday, August 4, 2016 1:50 PM

Today I wanted to install bower with following command on macbook

npm install bower -g

However the command has failed with  following message:


npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
/usr/local/lib

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "bower" "-g"
npm ERR! node v6.3.1
npm ERR! npm v3.10.6
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)
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

The answer is right from the outset visible. We do not have the permission to execute the command. As some of us are windows folks, we just run the command prompt in administrator mode and the issue is resolved. But how can we do that on OS X?

 

We will use command called SUDO

sudo npm install bower -g

This command allows us to install what is need just after entering a password. 

Blog
Products
Error pages
Links and tools