Gunacelan M
Gunacelan M

Reputation: 317

Getting "'node' is not recognized" error when running JavaScript with Code Runner in VS Code

After I installed Code Runner in VS Code then used it to run my JS code, I'm getting this runtime error:

'node' is not recognized as an internal or external command, operable program or batch file.

What does that mean?

Upvotes: 4

Views: 8024

Answers (3)

user22246140
user22246140

Reputation: 1

With the error during installation of node js make sure the add path is checked before installation. When the installation is done restart the vs code. It should be fine.

Upvotes: 0

ian
ian

Reputation: 21

What also helped me was (after installing node) going into VS settings, finding

code-runner.runInTerminal

and ticking it on.

Upvotes: 2

Jun Han
Jun Han

Reputation: 13821

The error message means you have not installed Node.js on your machine. Make sure you have installed the Node.js from https://nodejs.org/en/, and set the correct PATH environment variable.

Upvotes: 1

Related Questions