Home > Net >  I am using NodeJs currently now Node has taken over my computer
I am using NodeJs currently now Node has taken over my computer

Time:01-09

I installed Node and then started using it, it automatically integrated with my Code Runner in VS Code. But later I wanted to use simple Import and Export ES6 modules instead of Node 'require' core modules but later on I realized that if I run my code without Node the code(And from that I mean a one-liner console.log() Here check my image for the above problem ) doesn't seem to be running, can someone help me out. Do I need to delete Node in order to run the code simply or what? Please help, I am really annoyed.

CodePudding user response:

Everything seems perfectly fine, you just need to run the code using the following command for explicitly telling console to run your code using nodeJS

node ./practice1.js

This should solve your problem.

CodePudding user response:

Do you want to run the code with code runner?

To run code: use shortcut Ctrl Alt N. or press F1 and then select/type Run Code , or right click the Text Editor and then click Run Code in editor context menu.

  •  Tags:  
  • Related