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 Node.js Basics (2014) Building a Command Line Application Making a GET Request with http

Module.js:442 Error Received

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

Error: Cannot find module '/home/treehouse/workspace/app.jsp'

Here'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);

});

Cheo R
Cheo R
37,150 Points

Is your file named app.js or app.jsp?