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 trialOwace A
777 Pointsnode app.js does not execute (no errors)
anyone else facing this issue? Theres no syntax errors or anything of the sort.
when i execute node app.js nothing happens except a new command line coming up
Owace A
777 PointsYes, of course. Here is the code:
var http = require("http"); var userName = "owacea";
function printMessage(userName, badgeCount, points) { var message = userName + " has " + badgeCount + " total badge(s) and " + points + "points in JavaScript"; console.log(message); }
var req = http.get("http://teamtreehouse.com/" + userName + ".json", function(resp){ console.dir(resp); });
this works perfectly fine on my local, just not in the treehouse workspace.
So this is not really an issue for me now. This prompted me to get setup locally so I can just work from there going forward.
4 Answers
bbvjjwjaqq
1,849 PointsDid you save your app.js file before you executed it in the console?
Yin Jie Soon
13,382 PointsI think pressing command S or control S and then executing it is a good idea. It worked for me...
Yin Jie Soon
13,382 PointsI think pressing command S or control S and then executing it is a good idea. It worked for me...
Owace A
777 Pointsit wasnt saved.....oops! new to Mac so I kept pressing control + s instead of cmd + s.
William Li
Courses Plus Student 26,868 PointsWilliam Li
Courses Plus Student 26,868 Pointscan you post your code? It's impossible to tell what goes wrong without seeing the actual code.