workers-sdk
workers-sdk copied to clipboard
๐ BUG: wrangler pages dev runtime failure
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
- Initialize node project directory.
- Create test page in subdirectory. ex.
site/index.html - Create package.json script.
"dev": "wrangler pages dev site" - Install wrangler. ex.
pnpm i -D wranglerornpm i -D wrangler - Run package.json script.
pnpm run devornpm run dev(neither worked for me.)
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\[email protected]\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\[email protected]\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\[email protected]\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.
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
> [email protected] 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
Could you create a reproduction and push it to a github repository so that we can try it out?
Sure, I updated the description with a link to it.
@Sammy-T I'm unable to reproduce this with your reproduction repo. Could you try upgrading to the latest version of Node & Wrangler? What's the specific version number of your Windows 10 install?
I updated both wrangler and node and it still fails. Here's my OS info and the received error.
Windows 10 22H2 Version 10.0.19045 Build 19045
โ
๏ธ wrangler 3.63.1
-------------------
โฒ [WARNING] No compatibility_date was specified. Using today's date: 2024-07-08.
โฏโฏ Add one to your wrangler.toml file: compatibility_date = "2024-07-08", or
โฏโฏ Pass it in your terminal: wrangler pages dev [<DIRECTORY>] --compatibility-date=2024-07-08
See https://developers.cloudflare.com/workers/platform/compatibility-dates/ for more information.
No Functions. Shimming...
โ Starting local server...
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ [b] open a browser, [d] open Devtools, [c] clear console, [x] to exit โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
C:\Users\Sammy\Documents\GitHub\temp\wrangler-pages-err\node_modules\wrangler\wrangler-dist\cli.js:29765
throw a;
^
MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
at #assembleAndUpdateConfig (C:\Users\Sammy\Documents\GitHub\temp\wrangler-pages-err\node_modules\miniflare\dist\src\index.js:9178:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Mutex.runWith (C:\Users\Sammy\Documents\GitHub\temp\wrangler-pages-err\node_modules\miniflare\dist\src\index.js:3521:16) {
code: 'ERR_RUNTIME_FAILURE',
cause: undefined
}
Node.js v20.15.1
Same for me [email protected] works but anything later breaks with the same error (windows 10 22h2) EDIT: Solved it thanks to https://github.com/cloudflare/workers-sdk/issues/6170#issuecomment-2245209918
https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 Update latest Visual C++ Redistributable and it works with [email protected]
Same for me [email protected] works but anything later breaks with the same error (windows 10 22h2) EDIT: Solved it thanks to #6170 (comment)
https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 Update latest Visual C++ Redistributable and it works with [email protected]
That seems to have fixed it for me. Thanks, @cpakken.