Failed to run "expo start" in WSL, spawn powershell.exe ENOENT

When I run “expo start” in WSL, it failed to launch DevTools and the error message is:

Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser... (press shift-d to disable)
Error: spawn /mnt/c/System32/WindowsPowerShell/v1.0/powershell.exe ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

The strange thing is powershell.exe should locate in “/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe” rather than “/mnt/c/System32/WindowsPowerShell/v1.0/powershell.exe”

I tried to copy powershell.exe to “/mnt/c/System32/WindowsPowerShell/v1.0/powershell.exe” and the error becomes EACCES. “sudo” doesn’t help with this issue either.

Besides, the “shift-d” doesn’t stop the opening process of DevTools.

Please run expo diagnostics and paste the log that’s printed out along with your question or issue!

Expo CLI 4.0.15 environment info:
OS: Linux 4.4 Ubuntu 18.04.2 LTS (Bionic Beaver)
Shell: 5.4.2 - /bin/zsh
Node: 14.15.3 - /usr/local/bin/node
npm: 6.14.9 - /usr/local/bin/npm
expo: ~40.0.0 => 40.0.0
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: => 0.63.2
react-native-web: ~0.13.12 => 0.13.18
expo-cli: 4.0.15
Expo Workflow: managed

Hey @greyring, could you please create a github issue on the cli repo providing all the details you provided here?


Thanks, I have opened a new issue now.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.