Home > OS >  Error when trying to run JS in VScode for the first time (newbie)
Error when trying to run JS in VScode for the first time (newbie)

Time:08-01

So i just installed VScode on my Windows 10. I keep getting the following error:

"Can't find Node.js binary "node": path does not exist. Make sure Node.js is installed and in your PATH, or set the "runtimeExecutable" in your launch.json"

I've tried reinstalling VS and rebooting, tried installing from different folders (both on C drive and the second time i added it to my programs folder)

I tried installing a node.js extension which fails every time and then prompts me to try it manually...which then leads to a file downloading automatically, but when i add it to my VS folder through my file explorer, nothing happens still.

I tried installed a different node.js debugger

I tried changing my debugger to chrome too but all it does is take me to localhost:8080 and an empty page of course.

When i go through file explorer and look through the path of my .vscode folder, the nightly extension (node.js) is there....

I'm new to VScode and have just been using Scrimba's terminal to do my code but decided to try something more professional

CodePudding user response:

You have to install nodes from this website https://nodejs.org/

CodePudding user response:

I think you're putting node.js in the same folder/path as .vscode, this isn't correct. What you need to do is set node.js in your PATH which is different. See this answer for more information on how to set PATH/environment variables. Also install it from the official website nodejs.org. After changing your PATH remember to reboot.

I wouldn't recommend downloading "node.js extensions" as those likely are not legitimate, and as you've said yourself they don't work. Only download from the official website.

  • Related