-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add Compatibility with Windows Subsystem for Linux #187
Comments
Sorry if my question below is obvious, but I have never used WSL. If you have a local |
No worries! Assuming you're not already in the directory, WSL provides the cmd
|
Keep in mind that Windows does limit what you can do from within Linux for security reasons. So you wouldn't specifically be able to run JavaScript files sitting in your C: drive's root unless you ran cmd as administrator. But typically anything goes for any other directory. So if you were to nest the file just once, |
I have the same issue and I tried to configure Quokka without success... @ArtemGovorov Here's a full example of how one could launch a node process inside WSL to run a specific file based on a Windows path:
Explanation:
I approve @DamianRivas suggestion to configure Quokka's to something like this (based on my example above): {
"useWsl": true,
"node": "/home/Ricardo/.node/bin/node"
} Then just use that information to properly launch the node process inside WSL. I hope this information is useful :) |
Haven't tried it so not sure if it's going to work, but I'm wondering if for now it may be possible to create a command/bat file like
and configure Quokka as
|
@ArtemGovorov I tried that but I'm not sure how to pass the opened file to the command... |
@ArtemGovorov Any progress? |
@rfgamaral Not yet, I'll post an update here when there'll be some. |
would love to see this as well... i tend to work exclusively from a WSL environment when im on windows so would be gret if this were a reality |
may want to look at how vscode themselves implemented this for their launch.json |
The next release of Webstorm (2018.2) will have better support to invoke the Node interpreter in WSL. I too, would like to see Quokka support this. Like others here, I work projects running in WSL but use Windows applications (like Webstorm) for editing and such. |
We've now added support for WSL in Quokka. It was possible to achieve this by overriding your For Microsoft Windows environments, Quokka can be configured by editing your global quokka
If configuring a custom version of This is available in IntelliJ v1.0.109+, VS Code v1.0.144+, and Atom v1.0.88+. You can refer to our docs on our website for more information. |
Awesome, thanks guys :) I just wanted add that I had to configure it like this to get it working (I use {
"node": "/home/Ricardo/.node/bin/node",
"useWsl": true
} If I used |
Thanks for the feedback. By default, we launch using What version is reported if you run the command below using Windows command-line or Powershell?
|
|
I actually get the same output with powershell. I use nvm in WSL.
|
The |
@smcenlly I think you might be misunderstanding my problem. I have referenced the node version explicitly in my Quokka configuration. But the problem is that a relative path based on my home does not work, while an absolute one does:
Shouldn't both work? |
Thanks for the clarification. Will take a look at this next week and get back to you. |
This was an issue in Quokka for VSCode and Atom and has now been fixed. This is available in the latest version of these plugins, Quokka for VSCode v1.0.147 and Quokka for Atom v1.0.90. |
Working now, awesome. Thanks @smcenlly, good job :) |
I'm also using n for my node manager and on the latest version of WSL, I can no longer reference my node installation in WSL. I get the error "runnerw.exe: CreateProcess failed with error 2: The system cannot find the file specified." Here is my config.json in windows: {"pro":true, "useWsl":true, "node": "/home/eric/n/bin/node"} Windows build 1903 |
Thanks for reporting the problem. We've fixed this in the latest version of Quokka for IntelliJ, v1.0.150. |
When Node is installed using apt in WSL (Ubuntu 18.04) and without a Node version manager, setting the
What ended up working is to have
And then in Windows User Environment Variables add the following to
Should return (with no errors in Output tab):
|
@christianboyle - thanks for sharing your solution. In the past we've seen problems with wsl not correctly resolving paths that are set by your wsl terminal's user startup scripts (e.g. {
"pro":true,
"useWsl": true,
"node": "/home/myusername/.nvm/versions/node/v12.13.1/bin/node"
} |
Feature Request
This is basically a feature request.
I know from the Quokka docs that we can point Quokka to a node executable for it to use. It also says it runs the
node
command to run our code.With the way things are right now, I simply can't use Quokka anymore. Since I transitioned to Windows Subsystem for Linux (WSL) to develop node applications, I can't point Quokka directly to node because it's unsafe to directly access the Linux file system from Windows.
But you can safely access the file system from bash. It would be great if Quokka gave us the option to "toggle" WSL.
For example, if you installed node normally in Windows, you would simply run
node -v
in cmd to get the current version of node.cmd
If you installed node in say Ubuntu through WSL, you can still run node commands in cmd if you know the path where the node binary is.
cmd
What Would this Look Like?
This is just a suggestion, but maybe we could configure
config.json
like this:WSL was designed with interoperability with native Windows processes so I think this should be easily feasible. And I like Quokka so I would like to continue using it :)
Code editor version
Visual Studio Code v1.22.2
OS name and version
Windows
The text was updated successfully, but these errors were encountered: