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 trialErik L
Full Stack JavaScript Techdegree Graduate 19,470 Pointson visual studio code editor using terminal? I type node pet.js and I get an error saying bash: node command not found
How do I access file with terminal on visual studio code, I am on the OOP section of JS, and when I type node pet.js I get "bash: node: command not found"
1 Answer
Jason Rawsterne
4,557 PointsYou need to add the node install directory to your system path variable. Will be different depending on operating system. Google should be able to help you further
Erik L
Full Stack JavaScript Techdegree Graduate 19,470 PointsErik L
Full Stack JavaScript Techdegree Graduate 19,470 PointsI followed the instructions on this article https://blog.teamtreehouse.com/install-node-js-npm-mac, it seems that my computer has node.js and npm installed but when I tried to access the code in a file called
Pet.js
I got several errors, this is bad because I can't practice the code in the videos in visual studio if the node command isn't working and I prefer using a text editor over workspaces