nuxt-hub / core

Build full-stack applications with Nuxt on CloudFlare, with zero configuration.
https://hub.nuxt.com
Apache License 2.0
993 stars 57 forks source link

Failed to initialize wrangler bindings proxy The Workers runtime failed to start. #354

Closed therealokoro closed 2 weeks ago

therealokoro commented 3 weeks ago

Describe the bug I keep getting this error, each time I try running the development server. I have nuxthub installed on a working nuxt app. I am using Win 11

Here is my app info generated by nuxi info

------------------------------
- Operating System: Windows_NT
- Node Version:     v20.10.0
- Nuxt Version:     3.13.2
- CLI Version:      3.15.0
- Nitro Version:    2.9.7
- Package Manager:  pnpm@9.11.0
- Builder:          -
- User Config:      default
- Runtime Modules:  @nuxt/devtools@1.6.0, @nuxt/image@1.8.1, @nuxt/eslint@0.6.0, @nuxt/fonts@0.10.2, @nuxt/icon@1.5.8, @nuxtjs/seo@2.0.0-rc.23, @unocss/nuxt@0.63.6, @vueuse/nuxt@11.1.0, @nuxthub/core@0.8.3, nuxt-marquee@1.0.4, @vee-validate/nuxt@4.14.6, nuxt-tiptap-editor@2.0.0, @morev/vue-transitions/nuxt@3.0.2
- Build Modules:    -
------------------------------
Received structured exception #0xc0000005: access violation; stack: 7ff9595d32a7 7ff7cc04bbdb 7ff7cc04bca3 7ff7cbfeda3c 7ff7cbfed9e7 7ff7cb88372e 7ff7cb883a3f 7ff7ca671ed6 7ff7cb9ad67f 7ff7cb9b4916 7ff7cb9adb83 7ff7cb9b4916 7ff7cb9ab51c 7ff7ca661e61 7ff7cd15cb6f 7ff97b6753df 7ff97ca4485a

Failed to initialize wrangler bindings proxy The Workers runtime failed to start. There is likely additional logging output above.

  at Miniflare2.#assembleAndUpdateConfig (node_modules\.pnpm\miniflare@3.20241022.0\node_modules\miniflare\src\index.ts:1404:10)
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  at Mutex.runWith (node_modules\.pnpm\miniflare@3.20241022.0\node_modules\miniflare\src\workers\shared\sync.ts:66:45)  
  at Miniflare2.#waitForReady (node_modules\.pnpm\miniflare@3.20241022.0\node_modules\miniflare\src\index.ts:1486:3)    
  at Miniflare2._getProxyClient (node_modules\.pnpm\miniflare@3.20241022.0\node_modules\miniflare\src\index.ts:1692:3)  
  at Miniflare2.getBindings (node_modules\.pnpm\miniflare@3.20241022.0\node_modules\miniflare\src\index.ts:1715:23)     
  at async getPlatformProxy (node_modules\.pnpm\wrangler@3.83.0_@cloudflare+workers-types@4.20241022.0\node_modules\wrangler\wrangler-dist\cli.js:217062:20)
  at _getPlatformProxy (node_modules\.pnpm\nitro-cloudflare-dev@0.2.1\node_modules\nitro-cloudflare-dev\dist\runtime\plugin.dev.mjs:48:17)
  at <anonymous> (node_modules\.pnpm\@nuxthub+core@0.8.3_ioredis@5.4.1_magicast@0.3.5_rollup@4.24.0_vite@5.4.10_@types+node@22.8.1_lz245h6welv5nhcwi7bqvwz754\node_modules\@nuxthub\core\dist\runtime\ready.dev.js:4:3)

Steps to reproduce Steps to reproduce the behavior: Install nuxthub, wrangler, drizzle-orm, drizzle-kit

Expected behavior Absolutely no errors.

RihanArfan commented 3 weeks ago

I can't seem to replicate the issue after creating a template via npx nuxthub init my-app on Windows 11, then following the Drizzle recipe docs.

------------------------------
- Operating System: Windows_NT
- Node Version:     v20.18.0
- Nuxt Version:     3.13.2
- CLI Version:      3.15.0
- Nitro Version:    -
- Package Manager:  pnpm@9.12.3
- Builder:          -
- User Config:      default
- Runtime Modules:  @nuxthub/core@0.8.3, @nuxt/eslint@0.6.1
- Build Modules:    -
------------------------------

Try updating Node.js (and pnpm optionally but it won't fix this), and/or deleting node_modules and pnpm-lock.yaml then reinstalling dependencies.

If the issue persists, please could you make a minimal reproduction :)

therealokoro commented 2 weeks ago

image

I think this error is local to my system, but I just can't seem to understand why. I've gone through the internet and could find anything that could help out. This error only happens when I install nuxt hub and wrangler into the project. I have tried using even the starter templates on nuxt hub homepage and I am greeted with the same issue.

RihanArfan commented 2 weeks ago

That's a very strange issue. After creating a starter template, could you try npx nuxt build then npx nuxthub preview? That way we can see whether Wrangler runs on its own.

therealokoro commented 2 weeks ago

I got it fixed by updating my VC_redist on my system. Apparantly that was the issue. Well thanks for the help