Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Error trying to install yeoman and bower . PLZ Help. #6981

Closed
Dujaydis opened this issue Dec 20, 2014 · 4 comments
Closed

Error trying to install yeoman and bower . PLZ Help. #6981

Dujaydis opened this issue Dec 20, 2014 · 4 comments
Labels

Comments

@Dujaydis
Copy link

Hey guys im brand new at web dev and coding in general.

trying to install yeoman and bower by typing in terminal " npm install -g yo " and " npm install -g bower "

i realized that most of the time the problem is not having root access which i enable by " dsenableroot " which roots successfully but still gives the same error:

npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/yo'
npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules/yo']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/usr/local/lib/node_modules/yo',
npm ERR!   fstream_type: 'Directory',
npm ERR!   fstream_path: '/usr/local/lib/node_modules/yo',
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!      'Object.oncomplete (fs.js:107:15)' ] }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 14.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! cwd /Users/Admin
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /usr/local/lib/node_modules/yo
npm ERR! fstream_path /usr/local/lib/node_modules/yo
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/yo'
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:46: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/Admin/npm-debug.log
npm ERR! not ok code 0
@smikes
Copy link
Contributor

smikes commented Dec 21, 2014

It would probably be safer if you could switch to using nvm -- this will allow you to globally install packages like bower and yo which give you new commands, without having to be root.

To install nvm do:

curl https://raw.githubusercontent.com/creationix/nvm/v0.20.0/install.sh | bash
nvm use 0.10
npm install -g npm@latest
npm install -g yo
npm install -g bower

Alternatively, if you don't want to use nvm, you could use sudo --

sudo npm install -g yo
sudo npm install -g bower

@Dujaydis
Copy link
Author

smikes! worked like a charm! used the sudo method.. however thanks for suggesting both ways im very eager to learn anything come across! hope ill be able to return the favor soon.

@smikes
Copy link
Contributor

smikes commented Dec 21, 2014

Great - it sounds like you have things sorted out. We will close the issue in about a week unless we hear back from you sooner.

hope ill be able to return the favor soon.

This is a really good community for that, and you will have numerous opportunities to "pay it forward" -- that is, to help someone else who's coming into it and learning about using npm packaged modules for frontend work (or someone like me, who's done back-end work but is new to front-end, etc.)

@othiym23
Copy link
Contributor

Closing as resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants