cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.41k stars 593 forks source link

🐛 BUG: wrangler pages dev runtime failure #6169

Open Sammy-T opened 6 days ago

Sammy-T commented 6 days ago

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

Wrangler v3.62.0

What version of Node are you using?

18.19.1

What operating system and version are you using?

Windows 10

Describe the Bug

Observed behavior

wrangler pages dev [directory] fails on v3.62.0. The exact same command is successful using v3.61.0 though.

Expected behavior

Successfully run the local server.

Steps to reproduce

Please provide a link to a minimal reproduction

https://github.com/Sammy-T/wrangler-pages-err

Please provide any relevant error logs

 ⛅️ wrangler 3.62.0
-------------------

▲ [WARNING] No compatibility_date was specified. Using today's date: 2024-06-29.

  ❯❯ Add one to your wrangler.toml file: compatibility_date = "2024-06-29", or
  ❯❯ Pass it in your terminal: wrangler pages dev [<DIRECTORY>] --compatibility-date=2024-06-29

  See https://developers.cloudflare.com/workers/platform/compatibility-dates/ for more information.

No functions. Shimming...
⎔ Starting local server...

C:\Users\Sammy\Desktop\New folder\node_modules\.pnpm\wrangler@3.62.0\node_modules\wrangler\wrangler-dist\cli.js:29747
            throw a;
            ^

MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
    at #assembleAndUpdateConfig (C:\Users\Sammy\Desktop\New folder\node_modules\.pnpm\miniflare@3.20240620.0\node_modules\miniflare\dist\src\index.js:9161:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Mutex.runWith (C:\Users\Sammy\Desktop\New folder\node_modules\.pnpm\miniflare@3.20240620.0\node_modules\miniflare\dist\src\index.js:3521:16) {
  code: 'ERR_RUNTIME_FAILURE',
  cause: undefined
}

Node.js v18.19.1
 ELIFECYCLE  Command failed with exit code 7.
petebacondarwin commented 5 days ago

I just tried to reproduce this on MacOS and Windows and it worked both times. For example on Windows:

PS C:\Users\Admin\dev\temp\foo> pnpm run dev

> foo@1.0.0 dev C:\Users\Admin\dev\temp\foo
> wrangler pages dev site

 ⛅️ wrangler 3.62.0
-------------------

▲ [WARNING] No compatibility_date was specified. Using today's date: 2024-06-29.

  ❯❯ Add one to your wrangler.toml file: compatibility_date = "2024-06-29", or
  ❯❯ Pass it in your terminal: wrangler pages dev [<DIRECTORY>] --compatibility-date=2024-06-29    

  See https://developers.cloudflare.com/workers/platform/compatibility-dates/ for more information.

No functions. Shimming...
⎔ Starting local server...
[wrangler:inf] Ready on http://127.0.0.1:8788
[wrangler:inf] GET / 200 OK (19ms)
[wrangler:inf] GET /favicon.ico 200 OK (19ms)

Edition Windows 10 Pro Version 22H2 Installed on ‎01/‎04/‎2021 OS build 19045.4529 Experience Windows Feature Experience Pack 1000.19058.1000.0

petebacondarwin commented 5 days ago

Could you create a reproduction and push it to a github repository so that we can try it out?

Sammy-T commented 5 days ago

Sure, I updated the description with a link to it.