open: Error launching chrome from WSL
I’m getting an error when trying to use open@7.3.0 in WSL in a project built with @open-wc, @web/dev-server
This error doesn’t happen with open@7.2.1.
Steps to reproduce:
- Create a new project using:
npm init @open-wc --type scaffold --scaffoldType wc --features linting testing demoing --typescript true --scaffoldFilesFor testing demoing --tagName ui-element --writeToDisk true --installDependencies npm cd ui-element
2. run with npm start
The following error is displayed.
[web-dev-server] Error: spawn wslvar ENOENT
[web-dev-server] at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
[web-dev-server] at onErrorNT (internal/child_process.js:469:16)
[web-dev-server] at processTicksAndRejections (internal/process/task_queues.js:84:21) {
[web-dev-server] errno: ‘ENOENT’,
[web-dev-server] code: ‘ENOENT’,
[web-dev-server] syscall: ‘spawn wslvar’,
[web-dev-server] path: ‘wslvar’,
[web-dev-server] spawnargs: [ ‘systemroot’ ],
[web-dev-server] cmd: ‘wslvar systemroot’,
[web-dev-server] stdout: ‘’,
[web-dev-server] stderr: ‘’
[web-dev-server] }
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 16 (7 by maintainers)
Commits related to this issue
- Remove implicit dependency on wslvar binary (#198) — committed to tim-stasse/open by tim-stasse 4 years ago
- Remove usage of wslu This PR is simplified version of #198 - Windows 10 does not allow installing the OS to locations other than C:\Windows so fetching %systemroot% is unnecessary here (and since WSL... — committed to anaisbetts/open by anaisbetts 3 years ago
- Remove usage of wslu This PR is simplified version of #198 - Windows 10 does not allow installing the OS to locations other than C:\Windows so fetching %systemroot% is unnecessary here (and since WSL... — committed to anaisbetts/open by anaisbetts 3 years ago
Correct. I gave up on the automatic tests.
It seems open@7.3.0 requires
powershell.exeexists in PATH.Some new OS like Ubuntu had it included which some isn’t (like Debian I am using).