Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[uncaughtException] spawn /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe ENOENT #13770

Closed
nyxb opened this issue Apr 21, 2022 · 3 comments · Fixed by unjs/listhen#22

Comments

@nyxb
Copy link
Contributor

nyxb commented Apr 21, 2022

Environment

Nuxt CLI v3.0.0-rc.1 11:16:45
RootDir: C:\Users\vidar\Projekte\Nine Realms\Websites\t9realms.dev\t9realms-dev 11:16:48
Nuxt project info: 11:16:48


  • Operating System: Windows_NT
  • Node Version: v17.8.0
  • Nuxt Version: 3.0.0-rc.1
  • Package Manager: pnpm@6.32.9
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

WIn 11 and Windows Terminal Powershell

Describe the bug

Nuxt CLI v3.0.0-rc.1 11:17:41
11:17:41

Local: http://localhost:3000/
Network: http://192.168.178.77:3000/
Network: http://172.27.32.1:3000/

ERROR [uncaughtException] spawn /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe ENOENT 11:17:41

at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

i Vite client warmed up in 1557ms 11:17:49
i Vite server warmed up in 940ms 11:17:49
√ Vite server built in 1566ms 11:17:49
√ Nitro built in 496 ms nitro 11:17:50

Additional context

It works under any other terminal on windows. Only under Windows Terminal Powershell not. Under Linux it runs as well.

Logs

Nuxt CLI v3.0.0-rc.1                                                                                       11:17:41  
                                                                                                           11:17:41
  > Local:    http://localhost:3000/ 
  > Network:  http://192.168.178.77:3000/
  > Network:  http://172.27.32.1:3000/


 ERROR  [uncaughtException] spawn /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe ENOENT     11:17:41

  at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
  at onErrorNT (node:internal/child_process:476:16)
  at processTicksAndRejections (node:internal/process/task_queues:83:21)

i Vite client warmed up in 1557ms                                                                          11:17:49
i Vite server warmed up in 940ms                                                                           11:17:49
√ Vite server built in 1566ms                                                                              11:17:49
√ Nitro built in 496 ms                                                                              nitro 11:17:50
@danielroe
Copy link
Member

What is the exact command you're running? nuxt dev -o?

@HoraceKeung
Copy link

I am on windows 10. I am getting the same error when running nuxi dev -o, this happened since RC1. No error If I run nuxi dev. But I can still access http://localhost:3000/ and develop as normal, just that it won't open in a new tab automatically like before.

Aareksio referenced this issue in Aareksio/listhen Apr 22, 2022
Hopefully fixes nuxt/framework#4495
@Aareksio
Copy link
Contributor

I done bisect on nuxt3 package versions and found the issue was introduced between 3.0.0-27497868.ee93659 (last working version) and 3.0.0-27501460.04a72f8 (first broken but working version). Sadly all 10 releases between those result in __dirname is not defined in ES module scope error.

Took a long while before I realized how npm ls listhen does not show the version bundled with nuxi... Long story short, when fixing #13730, package open dependency is-wsl was inlined in different manner than it was used before, leading to isWsl being a function, instead of a boolean.

pi0 referenced this issue in unjs/listhen Apr 25, 2022
* fix: properly invoke isWsl as a function

Hopefully fixes nuxt/framework#4495

* fix: typo
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants