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 User Authentication With Express and Mongo What is Authentication? Setting Up the Project

Michael Dinnall
Michael Dinnall
6,730 Points

Download files arent working

I downloaded this project on my computer and it isn't working i did what was instructed in the video. Nothing then i looked around on stackoverflow and still nothing. Please help PS. npm installed and evel did this

npm install node-gyp -g npm install bcrypt -g

npm install bcrypt -save

Here is my terminal error"

treehouse-express-auth@1.0.0 start /Users/michaeldinnall/Desktop/javascript-authentication-with-express-and-mongo node ./app

module.js:442 throw err; ^

Error: Cannot find module 'bcrypt' at Function.Module._resolveFilename (module.js:440:15) at Function.Module._load (module.js:388:25) at Module.require (module.js:468:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/michaeldinnall/Desktop/javascript-authentication-with-express-and-mongo/models/user.js:2:14) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458:32) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3) at Module.require (module.js:468:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/michaeldinnall/Desktop/javascript-authentication-with-express-and-mongo/routes/index.js:3:12) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458:32) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3) at Module.require (module.js:468:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/michaeldinnall/Desktop/javascript-authentication-with-express-and-mongo/app.js:42:14) at Module._compile (module.js:541:32)

Checkout the error. The first thing it mentions is that it doesn't have bcrypt :) Usually starting from the top of a failed message will get you there a lot faster.

1 Answer

npm install --global --save bcrypt
npm install --global --save node-gyp
Michael Dinnall
Michael Dinnall
6,730 Points

I tried your suggestion, but it didn't work.

Sorry, I forgot the code markdown in the forum. They need to be on separate lines,