You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having some trouble getting the extension to work in a WSL2 environment. I can run Jest from the WSL2 shell, but when I try to run tests with the extension I get this:
'\\wsl.localhost\Ubuntu\home\my_user\path\to\my\project'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
'npm' is not recognized as an internal or external command,
operable program or batch file.
indicating that the extension tried use cmd.exe to execute npm.
WSL2 apparently runs Linux GUI apps as Windows processes (please don't ask me the specifics, because I don't know). From what I can tell, the extension is checking what environment it's running in and uses that to determine what shell command to use, as seen here. I assume that the extension uses cmd.exe because it sees that VSCode is running as a Windows process. But since the process is initiated from my project directory, in the WSL2 environment, it doesn't have access to cmd.exe. It's a bit of a tangle.
One workaround I'm considering is running VSCode in an X server, so that the GUI runs as a linux process inside the WSL2 environment, but if anyone know's a simpler solution that doesn't involve installing an X server, that would be great.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm having some trouble getting the extension to work in a WSL2 environment. I can run Jest from the WSL2 shell, but when I try to run tests with the extension I get this:
indicating that the extension tried use
cmd.exe
to execute npm.WSL2 apparently runs Linux GUI apps as Windows processes (please don't ask me the specifics, because I don't know). From what I can tell, the extension is checking what environment it's running in and uses that to determine what shell command to use, as seen here. I assume that the extension uses
cmd.exe
because it sees that VSCode is running as a Windows process. But since the process is initiated from my project directory, in the WSL2 environment, it doesn't have access tocmd.exe
. It's a bit of a tangle.One workaround I'm considering is running VSCode in an X server, so that the GUI runs as a linux process inside the WSL2 environment, but if anyone know's a simpler solution that doesn't involve installing an X server, that would be great.
Beta Was this translation helpful? Give feedback.
All reactions