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 trialJuliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsUnable to install Bcrypt
Hello-
I am unable to install Bcrypt on the command line of my Mac OSX 10.
This is part of what comes up in my terminal when I type npm install bcrypt into my console:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
I did download Xcode to my computer earlier, so I am lost as to what could possibly wrong.
Thanks in advance to anyone who can help:-)
2 Answers
Pedro Sousa
Python Development Techdegree Student 18,546 PointsHello Juliette,
I tried to install bcrypt in my OX 10.10.5 and it went ok. I installed it globally and I did this:
sudo npm install bcrypt -g
But! Did you check their npm page? There's a nodejs compatibility table and also they have a few pre requisites (for instance, I would check my Python version, which must be 2.x).
You can check your node and you python version with:
node --version
python --version
Also, when installing bcrypt you can force its version to match the one of node's
sudo npm install bcrypt@[a compatible version number] -g
And btw, these are the versions that I am using:
pedro@macbook ~/Dev:$ node --version
v0.10.32
pedro@macbook ~/Dev:$ python --version
Python 2.7.10
Hope this can be of any help.
Have a great weekend.
,Pedro
Sherrie Gossett
14,924 PointsI had problems installing it too Juliette. I got various error messages like:
Failed at the bcrypt@0.8.5 install script 'node-gyp rebuild'.
Via a tip from stackoverflow I updated my Xcode to version 7 (which also required that I first update my OS) and restarted my laptop. That fixed it.
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsThanks Sherrie. I have bcrypt installed locally and globally now. I have also updated my Xcode to the latest version:-)
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsJuliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsD'oh! I forgot to open Xcode in the terminal beforehand:-)
But now I am getting this prompt from my console:
"Please try running this command again as root/Administrator."
...and when I do that I get this:
"Please include the following file with any support request: npm ERR! /Applications/Xcode.appdownload/npm-debug.log"
When I put this file path into my console it says that there is no such directory even though I can see the Xcode icon in my apps directory.
I don't understand what is happening. I though that I had already downloaded Xcode from the link provided by Treehouse.
Also, I just googled Xcode to see if I could do some troubleshooting and I came across this article:
http://news.yahoo.com/apple-making-sure-developers-dont-fall-victim-xcodeghost-205324939--abc-news-topstories.html
Is this the same Xcode as the link that is provided with the class or is it a knockoff that is not related to the one that I have just downloaded to my computer? Maybe this is why I am currently having issues in my console?
Apologies for all of the questions. Thanks to anyone who can help me sort this out:-)