Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Matthew Turner
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Matthew Turner
Full Stack JavaScript Techdegree Graduate 16,963 Points

Already read through all of the questions and tried everything. No help whatsoever. Please help.

Below is the code that I pasted in to the app.js file

var unsecurePlainTextPassword = "password"; var bcrypt = require('bcryptjs');

bcrypt.genSalt(10, function(err, salt) { bcrypt.hash(unsecurePlainTextPassword, salt, function(err, hash) { console.log(hash); }); });

This is what the console spits out.

treehouse:~/workspace$ node app.js
module.js:550
throw err;
^

Error: Cannot find module '/home/treehouse/workspace/app.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3

Why hasn't this course been updated. This is so frustrating. Please help as I am stuck here and unable to learn anything from this.

Hi,

where is your app.js file located? And could you provide a snapshot of your workspace?

Regards Magnus