Error: MiniflareCoreError [ERR_RUNTIME_FAILURE] when Starting Cloudflare Pages locally with Wrangler

To run a Cloudflare pages project locally with functions, I’m running the following command

wrangler pages dev --proxy=8080 --log-level=debug --compatibility-date=2023-09-04

My project is a [quasar] project that’s served on port 8080. However, I keep getting the following error in the log:

Compiling worker to "/var/folders/2h/krvh_c095nb21j_dkpb8sh1r0000gn/T/functionsWorker-0.5209931085675259.mjs"...
✨ Compiled Worker successfully
Retrieving cached values for userId from node_modules/.cache/wrangler
Metrics dispatcher: Dispatching disabled - would have sent {"type":"event","name":"build pages functions","properties":{}}.
 ⛅️ wrangler 3.9.0
wrangler dev now uses local mode by default, powered by 🔥 Miniflare and 👷 workerd.
To run an edge preview session for your Worker, use wrangler dev --remote
Metrics dispatcher: Dispatching disabled - would have sent {"type":"event","name":"run dev","properties":{"local":true,"usesTypeScript":false}}.
Using vars defined in .dev.vars
Your worker has access to the following bindings:
- Vars:
  - ENVIRONMENT: "(hidden)"
  - MAILGUN_API_KEY: "(hidden)"
  - MAILGUN_DOMAIN: "(hidden)"
  - MAILGUN_BASE_URL: "(hidden)"
  - DEFAULT_EMAIL: "(hidden)"
  - EMAIL_PRATYUSH: "(hidden)"
⎔ Starting local server...
workerd/server/server.c++:2614: info: Inspector is listening
✘ [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.

│ [b] open a browser, [d] open Devtools, [c] clear console, [x] to exit                                                                       │

And this server doesn’t listen to calls sent here. I’m running node version 18.17.1. Any help would be appreciated please!

Thank you

i have the same issue, I dont know a solution though. For now, what helps it for me is to do killall workerd (on macOS) and then start it up again it usually works.


Thanks a lot! It worked :slight_smile:

I’m getting another issue now though, every request I send via axios to my page function returns a 500 with a CORS error. I handled the options request at the top but I suspect I’m doing it wrong and will explore the solution from this question.

If you have had this issue and resolved it somehow, please let me know.

Thanks for your answer on my other question!

No I dont have that issue, but I am also not using axios.

Are you accessing a page (function) from another domain? Otherwhise im not sure how you would get a CORS error.

Maybe your CORS header has a trailing “/” which CORS doesnt like. That was the case when i had a CORS error in the past.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.