node npm Installing bower = npm ERR New computer, fresh start. Was installing bower from terminal and got this ERR! message in return. Seems common, but i'm hesitant in forcing it with sudo.


OSX 10.10.3
git version 2.3.2 (Apple Git-55)
npm (2.9.1)
node v0.12.3 are installed.



  npm install -g bower


npm ERR! tar.unpack untar error /Users/username/.npm/bower/1.4.1/package.tgz
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! node v0.12.3
npm ERR! npm  v2.9.1
npm ERR! path /usr/local/lib/node_modules/bower
npm ERR! code EACCES
npm ERR! errno -13

npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/bower'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules/bower']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/usr/local/lib/node_modules/bower',
npm ERR!   fstream_type: 'Directory',
npm ERR!   fstream_path: '/usr/local/lib/node_modules/bower',
npm ERR!   fstream_class: 'DirWriter',
npm ERR!   fstream_stack: 
npm ERR!    [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR!      '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR!      'FSReqWrap.oncomplete (fs.js:95:15)' ] }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/username/npm-debug.log
You can't normally install command-line software without administrator permissions. Do as it says and run with sudo, and you will be able to proceed.

This isn't "forcing" it, it's just elevating your permissions to do something that isn't safe to have accessible to non-administrators, thus requiring sudo.