Sunday, May 7, 2023
Node.js – Error ‘console’ is undefined
I just installed Node.js on a new system and wanted to make sure it worked. I tested it with a simple hello world script.
Contents of the node.js fileconsole.log("Hello node");
Then I attempted to run it:C:\>node node.js
Which produced the following error:Script: C:\node.js
Line: 1
Char: 1
Error: 'console' is undefined
Code: 800A1391
Source: Microsoft JScript runtime error
Solution:
1. On the node.js file and right click -> properties
2. In front of Opens with: click on the 'change' button.
3. To change it from 'Microsoft script' host to Node.js:
a) click on 'more apps' -> scroll down and click on 'look for more apps on this PC' -> a window will pop up , in that go to the directory where 'nodejs' is installed in your PC. -> Windows(C:) -> Program Files(x86) -> nodejs -> click on the 'open' button -> click on 'node' Application file icon and finally click on 'open' again.
4. click on 'Apply' -> 'ok' buttons.
That's it.
Class IX IT notes: Part A, Unit 1, Session 3.
IT notes class 9 Part A Unit 1: COMMUNICATION SKILLS session 3: VISUAL AND WRITTEN METHODS OF COMMUNICATION Q1. What is Visual Communicatio...
-
//The HTML index page <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change ...
-
Here are some links to online work sites https://www.upwork.com/ https://www.guru.com/ https://studio.envato.com/freelance-switch/ htt...
-
https://www.educba.com/python-list/?btnz=wsm-fb-ros&utm_source=quora&utm_medium=referral
.png)