nuxt / cli

⚡️ Nuxt Generation CLI Experience.
https://github.com/nuxt/cli/discussions/3
MIT License
267 stars 65 forks source link

[windows] 'ERROR spawn UNKNOWN' when using `nuxi dev --tunnel` #216

Open MuhammadM1998 opened 1 year ago

MuhammadM1998 commented 1 year ago

I've upgraded to nuxi 3.9.0 and I got this error when trying to run nuxi dev --tunnel

 ERROR  spawn UNKNOWN                                                                                                                                                         10:16:55 pm

  at ChildProcess.spawn (node:internal/child_process:414:11)
  at spawn (node:child_process:761:9)
  at startCloudflaredTunnel (/C:/Users/Muhammad/AppData/Local/pnpm/global/5/.pnpm/nuxi@3.9.0/node_modules/nuxi/dist/chunks/index7.mjs:143:17)
  at startTunnel (/C:/Users/Muhammad/AppData/Local/pnpm/global/5/.pnpm/nuxi@3.9.0/node_modules/nuxi/dist/chunks/index5.mjs:36:24)
  at async listen (/C:/Users/Muhammad/AppData/Local/pnpm/global/5/.pnpm/nuxi@3.9.0/node_modules/nuxi/dist/chunks/index2.mjs:29757:14)
  at async _createDevProxy (/C:/Users/Muhammad/AppData/Local/pnpm/global/5/.pnpm/nuxi@3.9.0/node_modules/nuxi/dist/chunks/dev.mjs:229:20)
  at async Object.run (/C:/Users/Muhammad/AppData/Local/pnpm/global/5/.pnpm/nuxi@3.9.0/node_modules/nuxi/dist/chunks/dev.mjs:184:24)
  at async runCommand$1 (/C:/Users/Muhammad/AppData/Local/pnpm/global/5/.pnpm/nuxi@3.9.0/node_modules/nuxi/dist/shared/nuxi.9d864d83.mjs:1647:7)
  at async runCommand$1 (/C:/Users/Muhammad/AppData/Local/pnpm/global/5/.pnpm/nuxi@3.9.0/node_modules/nuxi/dist/shared/nuxi.9d864d83.mjs:1638:11)
  at async runMain$1 (/C:/Users/Muhammad/AppData/Local/pnpm/global/5/.pnpm/nuxi@3.9.0/node_modules/nuxi/dist/shared/nuxi.9d864d83.mjs:1770:7)

nuxi dev and other commands works as expected. I've installed cloudflared but that didn't work too. Am I missing something?

My nuxi info:

------------------------------
- Operating System: Windows_NT
- Node Version:     v18.18.0
- Nuxt Version:     3.7.4
- CLI Version:      3.9.0
- Nitro Version:    2.6.3
- Package Manager:  pnpm@8.8.0
- Builder:          -
- User Config:      devtools, modules, pinia, i18n, supabase
- Runtime Modules:  @vueuse/nuxt@10.4.1, @pinia/nuxt@0.4.11, @nuxt/ui@2.8.1, @nuxtjs/i18n@8.0.0-rc.4, @nuxtjs/supabase@1.1.2
- Build Modules:    -
------------------------------
MuhammadM1998 commented 1 year ago

Update: I've upgraded to Nuxt from 3.7.3 to 3.7.4 and the error persists. My guess is that it's a windows issue. Any help is appreciated

frasza commented 1 year ago

Same issue on my side using Nuxt 3.7.4 with latest CLI version. Windows 11, using NVM for node version 18.18.0.