Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bower Installation Errors

Now I have installed Node and Npm and I run this command in terminal (yes I am on a mac):

npm install -g bower 

Which follows with this output from the terminal:

npm http GET https://registry.npmjs.org/bower npm http 304 https://registry.npmjs.org/bower npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/bower' npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules/bower'] npm ERR!   errno: 3, 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:37:53', npm ERR!      'Object.oncomplete (fs.js:107:15)' ] } npm ERR!  npm ERR! Please try running this command again as root/Administrator.  npm ERR! System Darwin 13.0.0 npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "bower" npm ERR! cwd /Users/Superfunnytogo npm ERR! node -v v0.10.25 npm ERR! npm -v 1.3.24 npm ERR! path /usr/local/lib/node_modules/bower npm ERR! fstream_path /usr/local/lib/node_modules/bower npm ERR! fstream_type Directory npm ERR! fstream_class DirWriter npm ERR! code EACCES npm ERR! errno 3 npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/bower' npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23 npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53 npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) npm ERR!  npm ERR! Additional logging details can be found in: npm ERR!     /Users/Superfunnytogo/npm-debug.log npm ERR! not ok code 0 Device-365-352:~ Superfunnytogo$ npm install -g bower npm http GET https://registry.npmjs.org/bower npm http 304 https://registry.npmjs.org/bower npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/bower' npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules/bower'] npm ERR!   errno: 3, 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:37:53', npm ERR!      'Object.oncomplete (fs.js:107:15)' ] } npm ERR!  npm ERR! Please try running this command again as root/Administrator.  npm ERR! System Darwin 13.0.0 npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "bower" npm ERR! cwd /Users/Superfunnytogo npm ERR! node -v v0.10.25 npm ERR! npm -v 1.3.24 npm ERR! path /usr/local/lib/node_modules/bower npm ERR! fstream_path /usr/local/lib/node_modules/bower npm ERR! fstream_type Directory npm ERR! fstream_class DirWriter npm ERR! code EACCES npm ERR! errno 3 npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/bower' npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23 npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53 npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) npm ERR!  npm ERR! Additional logging details can be found in: npm ERR!     /Users/Superfunnytogo/npm-debug.log npm ERR! not ok code 0 
like image 779
Hurricane Development Avatar asked Feb 07 '14 00:02

Hurricane Development


People also ask

Is bower deprecated?

Bower has been deprecated by its creators After a long and heated debate on Github, the creators of Bower decided it does not add value to the current web development stack and should be discontinued.

How does bower install work?

Bower doesn't concatenate or minify code or do anything else - it just installs the right versions of the packages you need and their dependencies. To get started, Bower works by fetching and installing packages from all over, taking care of hunting, finding, downloading, and saving the stuff you're looking for.

Does bower use npm?

Bower depends on Node. js and npm. Also make sure that git is installed as some bower packages require it to be fetched and installed.


1 Answers

You need root access or permissions to install globally! Try :

 sudo npm install -g bower 
like image 128
c0d3junk13 Avatar answered Oct 13 '22 05:10

c0d3junk13