No way to use jest installed within Windows Subsystem for Linux
See original GitHub issueEnvironment
-
node -v
: no version installed -
npm -v
: no version installed -
npm ls react-scripts
(if you haven’t ejected): N/A -
Operating system: Windows 10 + WSL
Steps to Reproduce
Use Windows 10 + Windows subsystem for linux. Install node/npm/jest within the subsystem only, not in windows.
Expected Behavior
There should be a way to use the version of jest installed within WSL rather than duplicating the installation of all the tools required, once within linux and once in windows
Actual Behavior
'jest' is not recognized as an internal or external command, operable program or batch file.
(Quite rightly, as there’s absolutely no node/jest/npm installed outside WSL)
I’ve tried to look through docs and other open bugs but cannot find anything similar, apologies if I’ve missed it! Note that I’m not sure if there are any guidelines for extension authors around using WSL, but it’s e.g. possible to debug files using node installed within WSL, so assuming it’s doable for extensions as well.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:36 (10 by maintainers)
Top GitHub Comments
That answers my question. You could set
"jest.pathToJest": "node node_modules/jest/bin/jest.js"
in VS Code’s settings, which should work with your setup (sincejest.cmd
basically just runs that command).I’ve been using the Remote WSL extension and it’s been working fine with that.
Get Outlook for Androidhttps://aka.ms/ghei36
From: Mike Lyons notifications@github.com Sent: Monday, June 17, 2019 10:47:09 PM To: jest-community/vscode-jest Cc: Bogdan Calapod; Mention Subject: Re: [jest-community/vscode-jest] No way to use jest installed within Windows Subsystem for Linux (#331)
Any updates on this? I’m having the same issue. Thanks! 🙏
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjest-community%2Fvscode-jest%2Fissues%2F331%3Femail_source%3Dnotifications%26email_token%3DABJVVR4JUR5ADGQTHTQKMSTP27S33A5CNFSM4FA6VHK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX4H5GQ%23issuecomment-502824602&data=02|01||1afc5c9f5ba14d09f69308d6f35c96a6|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636963976315261259&sdata=yONvuPAcrjgl%2B33L2Kgz6B%2FelniwrHaUpeE%2Bil3he5Q%3D&reserved=0, or mute the threadhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABJVVR25DGJF3XIQOQ4WARDP27S33ANCNFSM4FA6VHKQ&data=02|01||1afc5c9f5ba14d09f69308d6f35c96a6|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636963976315271270&sdata=th3b7E7TH%2BxCZNdJJomIzBfTTAoCbD2B0q4vzbrAAmg%3D&reserved=0.