LoginSignup
0
0

More than 1 year has passed since last update.

WebStormがArch Linux環境下のNodeを見つけてくれない問題

Posted at

環境

OS: Arch Linux
Kernel: 5.15.74.2-microsoft-standard-WSL2
WebStorm: 2022.2.3 (2022/11/22現在のLTS) & 2022.3 RC (次期バージョンのリリース候補)

何が起きたのか

本来自動的に指定されるNode InterpreterをWebStormが見つけることが出来ず、WebStorm上からNode.jsの機能が利用できない


公式のドキュメントには次のような記載がある

Click the Browse button next to the Node Interpreter field, in the Node.js Interpreters dialog that opens, click the Add button, and then select Add WSL from the list.

ところが Add WSL に候補となるInterpreterが出てこないし、Add Local(Windows側のファイルシステムから参照する方法) から追加しようとしても、正常なパスとして動作してくれない。

image.png

image.png

image.png

解決方法

Add WSL からディストリビューション側のパスで指定してあげる
(Add Local でコピーしたのち、\\wsl$\Arch\ の部分をバッサリ消す)

image.png

Windows(どっちかというとWSL2)側のファイルシステムからのパスでは参照できないのだろうか。

Windows(WSL2)側のパス: \\wsl$\Arch\home\m2en\.nvm\versions\node\v18.12.0\bin\node
ArchLinux側のパス: \home\m2en\.nvm\versions\node\v18.12.0\bin\node


本来は Add WSL で候補が出てくるのが普通だと思うし、現状のRC(リリース候補)でも同じように発生しているのでYouTrackでバグを報告しておこうと思う (Ubuntuとかのディストリビューションではちゃんと出るのだろうか....)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0