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 trialMark Hereford
30,355 PointsModule.js:442 Error Received
treehouse:~/workspace$ node app.jsp
module.js:442
throw err;
^
Error: Cannot find module '/home/treehouse/workspace/app.jsp'
Cheo R
37,150 PointsIs your file named app.js or app.jsp?
Mark Hereford
30,355 PointsMark Hereford
30,355 PointsHere's the code:
var https = require("https"); var username = 'mhereford127';
function printMessage(username, badgeCount, points) { var message = username + " has " + badgeCount + " total badge(s) and " + points + " points in JavaScript"; console.log(message); }
//Connect to the API URL (https://teamtreehouse.com/username.json) var request = https.get("https://teamtreehouse.com/" + username + ".json", function(response) { console.dir(response);
});