-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node integration issues with Windows 10 WSL #42289
Comments
|
Coming from a Mac background I'm definitively using Bash in the integrated terminal, thinking of changing to Fish once things are working :) From your points 2 and 3 it sounds like you may have Node installed on both sides? Maybe that is a way to go or else the following link might have a solution? Sounds like Code-Runner needs Node on the Windows side if there is no other way to configure it? |
Yes I have Node installed on both sides, because I need to build and test native node addon on both platforms. But as I stated in point 2, maybe it's enough to install Node on Windows then use it with The blog you linked talks about using Visual Studio Code to debug Node scripts running in WSL, which is not quite relative to your problem. |
Setting the alias in WSL for node.exe is what I do not know how to do. I this done in bashrc or somewhere in VSCode or elsewhere? My experience editing bashrc by opening it in VSCode has not been great, as far as I can tell editing files from the WSL side on the Windows side will destroy them, see these issues: |
Please ask your question on StackOverflow. We have a great community over there. They have already answered thousands of questions and are happy to answer yours as well. See also our issue reporting guidelines. Happy Coding! |
Awesome, Code-Runner now works with Node under WSL, see: |
I've recently moved to Windows 10 and have found a few unexpected conundrums along the way when installing and working with Node. All I'm hoping to do is have VSCode, WSL and Node all work together.
So far, after installing VSCode v1.19.2 I used the Node v9.4.0 msi installer only to discover that Node was only visible on the Windows side (using the Node Command Prompt) and it was not found when doing a version check in the VSCode integrated terminal. I then removed the msi install and instead installed Node using NVM, following the steps on this excellent and rare site: https://www.tikalk.com/js/Installing-Node-on-Windows-Subsystem-for-Linux
This allowed me to use Node v9.4.0 from the integrated terminal except I was not able to use the super useful Code-Runner plugin. Thinking that it might be a PATH issue I finally thought I had the solution in this site: https://github.com/seanfisher/nvm-vscode. From what I had gathered from issues to this point is that the GUI and terminal sides of VSCode do not access Node under WSL in the same way. After trying nvm-vscode the Code-Runner plugin is still not working.
There seems to be something new about using Node in WSL here: https://blogs.msdn.microsoft.com/commandline/2017/10/27/running-node-js-on-wsl-from-visual-studio-code, although at this point I'm not sure what to try next?
It seems the integration between VSCode and Node is not quite perfect yet. So far my experience has not been great and a guide that brings Windows 10, WSL, Node and VSCode together would be very helpful. Essentially, what is the best way to install Node and have it work both in the GUI (Code-Runner) and the terminal?
The text was updated successfully, but these errors were encountered: