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 Introducing the Practice

Johan Cederschiöld
Johan Cederschiöld
5,708 Points

Maybe I'm wrong but I can't remember getting any instructions on how to run node in the console. Where can I find info?

I've done a few courses within the treehouse framework but I can't remember running node in the console being required earlier.

I've searched the community, but I think that one or two steps are missing. Can't seem to get it to work. Is there a step by step instruction on how to run a script in the console in workspaces?

Thanks in advance.

(EDIT: I've tinkered a bit and worked it out).

3 Answers

Kevin Gates
Kevin Gates
15,053 Points

Johan Cederschiöld You're right, they don't teach you that and I forgot.

Ashley Boucher : can you update the teacher notes with instructions with using node?

Jordan Kittle
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jordan Kittle
Full Stack JavaScript Techdegree Graduate 20,148 Points

I also didn't have any instruction on running node in the console before getting to this practice. Typing "node convert.js" in the console seems to do something but I don't see anything happen. I am wondering how the workflow brought me to this practice material without introducing node first. Edit: you'll finally see something happen when running node debug.js as this is the first file which calls the functions you're modifying.

Michael Jäkel
Michael Jäkel
6,373 Points

Hi Johan,

could you just give a hint, how you started node at the console successfully to show the workplaces for this lesson?

Thanks in advance!


Okay. Like Johan, I found the solution at the last session of this course. To start a workplace file like convert.js with node, just type "node convert.js" into the console. If you didn't have any syntax errors, the file will run or you will get some error messages otherwise.