1
votes

I need to add WSL node interpreter to WebStorm (2020.1) but Linux distribution is not detected by WebStorm, even though I have Alpine WSL install through Windows Store.

I read this question, but no help. Also manually adding entry in wsl.distributions.xml didn't work, did a lot of research but nothing worked.

I was able to use WSL as terminal in WebStorm by adding wsl.exe location to shell path. My objective is to run npm scripts form from Run/Debug configuration.

Linux distribution not detectable

1

1 Answers

0
votes

I solved by reinstalling WebStorm and copying options folder
from C:\Users\me\AppData\Roaming\JetBrains\WebStorm2020.1
to C:\Users\me\AppData\Local\JetBrains\WebStorm2020.1, then WebStorm could detect Linux distribution installed on machine.

But, now when I am trying to run scripts from NPM Tool Window of WebStorm, WebStorm runs C:\Windows\System32\wsl.exe run "/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js run start --scripts-prepend-node-path=auto" where run is redundant coming after C:\Windows\System32\wsl.exe ...

How can I set WebStorm to not have run in wsl.exe run ...?