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

JavaScript npm Basics (retiring) Installing Packages with npm Installing Local Packages

bcrypt installation error

Hi! Cannot manage to install bcrypt using npm. Here's a screenshot:

https://www.dropbox.com/s/qui3lppgaf19yon/bcrypt_installation_error.PNG?dl=0

Can someone tell me how to resolve this issue?

3 Answers

try to use sudo command to act as a super user:

sudo npm install bcrypt --python

Doesn't work, here's the message: 'sudo' is not recognized as an internal or external command, operable program or batch file.

I've tried to install it using command prompt run as an administrator, the message is a bit different but doesn't work either. Here's a screenshot: https://www.dropbox.com/s/quitkd3vuzux8d1/bcrypt_installation_error_2.PNG?dl=0

if you running on windows probably there's something out of date. try to config some settings; this switch might help:

npm install --msvs_version=<recent version here> <your package here>

check this thread for more docs: https://github.com/ncb000gt/node.bcrypt.js/issues/297