Home > other >  Error in VSCode returning exit code 1 when running console.log("Hello world"); in javascri
Error in VSCode returning exit code 1 when running console.log("Hello world"); in javascri

Time:04-21

I was trying to run my .js file in VSCode. But for some reason this line:

console.log("Hello world!");

returns:

[Running] node "c:\Users\ukkis\OneDrive\Рабочий стол\My_code\JS\test.js"
"node" �� ���� ����७��� ��� ���譥�
��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���.

[Done] exited with code=1 in 0.084 seconds

what happened?

CodePudding user response:

It seems like you haven't installed nodejs Runtime JavaScript Engine. To install:

  • For Windows download and install from official website https://nodejs.org
  • For Linux: sudo apt update and sudo apt install nodejs
  • Related