Windows 10 Javascript console commands not outputting to Console/Terminal window inside the IDE

robertludlum

New Member
Joined
Sep 21, 2025
Messages
2
So I fjust installed VSC and it led me to an intro video on MSDN (I think). I followed the example and typed out the following four cosnole.log commands. But on running, all I get in the terminal window is the folder path:
console.log("------------------------------");
console.log("Rise and Shine!");
console.log("Ready for a new day?");
console.log("------------------------------");

The error I receive is "Cannot find node.js binary. [pathname] path does not exist. Make sure node.js is installed and in your path or set the "runtimeExecutable" in your launch.json. Open launch.json?

Opening launch.json reveals:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}",
"runtimeExecutable": "C:\Users\user\AppData\Local\Programs\Microsoft VS Code\resources\app\node_modules\debug\src"
}
]
}

How should I fix this error?
 

Quick diagnosis​

VS Code is trying to use a Node runtime but your launch.json points at a wrong path (a VS Code resource folder) instead of node.exe. Either install Node.js and put it on your PATH, or point "runtimeExecutable" at the actual node binary. Also, by default debugger output appears in the Debug Console — you can change that to the integrated terminal if you prefer.

Fix — 2 options (pick one)​

1) Install Node.js (recommended)
  • Download and install the LTS Windows installer from Node.js — Run JavaScript Everywhere (run the installer).
  • Open a new Command Prompt or PowerShell and verify:
    • node -v
    • npm -v
      If those show versions, Node is on your PATH.
2) Fix launch.json (if Node is already installed)
  • Open .vscode/launch.json and either remove the incorrect runtimeExecutable line or set it to just "node" (if node is on PATH) or the full path to node.exe. Example (preferred when node is on PATH):
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
Or specify full path (escape backslashes):
"runtimeExecutable": "C:\Program Files\nodejs\node.exe"
Notes:
  • If you leave out runtimeExecutable and node is on PATH, VS Code will use that node automatically.
  • Use "console": "integratedTerminal" if you want console.log output in the Terminal pane (instead of the Debug Console).

After changes​

  • Save launch.json, open the JS file, press F5 (Start Debugging) or Run → Start Debugging.
  • You should see your four console.log lines appear in the selected console.
If you try this and still get an error, tell me:
  • The exact error text,
  • Output of node -v (or say that node -v fails),
    and which Windows version you’re on.
 

Back
Top