Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Maxim Kontsevitch
25,447 PointsUnable to install bower or any other packages globally using npm
I have installed node.js and it works. but when i try to install a package using npm it throws me bunch of errors. Thank in advance, Svetlana!
8 Answers

Robert Richey
Courses Plus Student 16,352 PointsI found this stackoverflow post that may help. Of particular interest are some of the posted answers.

Robert Richey
Courses Plus Student 16,352 Points- What is your operating system?
- What are the error messages?

Maxim Kontsevitch
25,447 Points- My operating system is Mac OSX Yosemite. -My error messages are:
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/bower' npm ERR! { [Error: EACCES, unlink '/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! 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" "bower" npm ERR! cwd /Users/maxmac npm ERR! node -v v0.10.33 npm ERR! npm -v 1.4.28 npm ERR! path /usr/local/lib/node_modules/bower npm ERR! code EACCES npm ERR! errno 3 npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/bower' npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/bower' npm ERR! error rolling back { [Error: EACCES, unlink '/usr/local/lib/node_modules/bower'] npm ERR! error rolling back errno: 3, npm ERR! error rolling back code: 'EACCES', npm ERR! error rolling back path: '/usr/local/lib/node_modules/bower' } npm ERR! not ok code 0

Maxim Kontsevitch
25,447 PointsThanks, That helped.

Maxim Kontsevitch
25,447 PointsI have installed bower but I couldn't install any package: bower cached git://github.com/jquery/jquery.git#2.1.0 bower validate 2.1.0 against git://github.com/jquery/jquery.git#* bower ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/jquery/jquery.git", exit code of #1
Additional error details:
xcrun: error: active developer path ("/Users/maxmac/Desktop/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select --switch path/to/Xcode.app
to specify the Xcode that you wish to use for command line developer tools (or see man xcode-select
)
Svetlanas-iMac:node.jsTest maxmac$ bower install
bower ENOENT No bower.json present

Robert Richey
Courses Plus Student 16,352 PointsThis post suggests a potential firewall issue.
Or this post suggests changing the git config protocol from git:// to https://
If these don't work, the search term I used in Google was "bower ECMDERR Failed to execute". Good luck.

Maxim Kontsevitch
25,447 Pointsok i will try it later on

Maxim Kontsevitch
25,447 Pointsok i will try it later on