formulahendry / vscode-code-runner

Code Runner for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner
MIT License
2.18k stars 291 forks source link

Allow Code-Runner to use Node.js on the WSL2 side [Feature request] #885

Open SuperstringDev opened 2 years ago

SuperstringDev commented 2 years ago

It seems I still have to install Node.js twice, once in WSL2 and again under Windows 11 to execute code.

Is it possible to target the WSL2 instance of Node.js, instead of the Windows 11 instance?

If it is possible how is the configuration path set?

If it is not yet possible it would be a good feature for Code-Runner to have.

formulahendry commented 2 years ago

Try this? https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl

SuperstringDev commented 2 years ago

The Remote-WSL extension was the solution once I moved my projects under the WSL root. Code-Runner now runs very fast and Node on the Windows side is no longer required. Thanks for Code-Runner.

josersleal commented 1 year ago

I have the WSL extension and still I get an error "/bin/sh: 1: node: not found

[Done] exited with code=127 in 0.142 seconds"

It does a cmd like:

node somepath/CodeRunnerFile.js"

However the file CodeRunnerFile.js does not exist