Search code examples
visual-studio-codevscode-code-runner

How to only run JS file with the code runner extension


I'm wanting to start to use JS in VS Code, so I installed the code runner extension to help me out. But I have a problem when I run a python it wanted to go through the code runner extension and not that python extension that I already have installed.


Solution

  • First install node js to run code through code runner extension or you can simply run the js file by the following way:

    node filename.js

    example: node index.js

    Remember: you need to first install node js globally and check whether it is installed perfectly or not, by checking version through node --version command in cmd.