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!
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
on 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"
Jason Rawsterne4,557 Points
You 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
I 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.jsI 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