Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 505
Gunacelan M Avatar asked Sep 02 '25 10:09

Gunacelan M


2 Answers

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

code-runner.runInTerminal

and ticking it on.

like image 96
ian Avatar answered Sep 04 '25 00:09

ian


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.

like image 27
Jun Han Avatar answered Sep 03 '25 22:09

Jun Han