Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev server crashes on freshly installed create-remix cloudflare-pages #7510

Closed
2 tasks done
cairin opened this issue Sep 21, 2023 · 5 comments
Closed
2 tasks done

dev server crashes on freshly installed create-remix cloudflare-pages #7510

cairin opened this issue Sep 21, 2023 · 5 comments

Comments

@cairin
Copy link

cairin commented Sep 21, 2023

What version of Remix are you using?

2.0.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

npx create-remix@latest --template remix-run/remix/templates/cloudflare-pages
  • Install dependencies with npm?
npm run dev

Make changes to ~/routes/_index.tsx and save.

Expected Behavior

The dev server should reload and changes reflected in browser.

Actual Behavior

The dev server crashes after compiling the worker functions. It seems like a race condition with some process being killed before it's no longer needed.

npm run dev

> dev
> remix dev --manual -c "npm run start"


 💿  remix dev

 info  building...
 info  built (288ms)

> start
> wrangler pages dev --compatibility-date=2023-06-21 ./public

Compiling worker to "/tmp/functionsWorker-0.5632176035625012.mjs"...
✨ Compiled Worker successfully
 ⛅️ 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
⎔ Starting local server...

▲ [WARNING] Parsed 2 valid header rules.

[mf:inf] Ready on http://0.0.0.0:8788
...
[REMIX DEV] 97debad6 ready

[mf:inf] GET / 200 OK (14ms)
...
[mf:inf] GET /favicon.ico 200 OK (3ms)

 info  rebuilding... (~ app/routes/_index.tsx)
✨ Compiled Worker successfully
...
✨ Compiled Worker successfully
⎔ Reloading local server...

▲ [WARNING] Parsed 2 valid header rules.

[mf:inf] Updated and ready on http://0.0.0.0:8788

/home/user/Documents/pages-clean-test/node_modules/wrangler/wrangler-dist/cli.js:30947
            throw a;
            ^

Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
    at new NodeError (node:internal/errors:400:5)
    at target.send (node:internal/child_process:740:16)
    at Object.announceAndOnReady [as onReady] (/home/user/Documents/pages-clean-test/node_modules/wrangler/wrangler-dist/cli.js:150032:15)
    at MiniflareServer.<anonymous> (/home/user/Documents/pages-clean-test/node_modules/wrangler/wrangler-dist/cli.js:128172:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on process instance at:
    at process.processEmit [as emit] (/home/user/Documents/pages-clean-test/node_modules/wrangler/wrangler-dist/cli.js:25324:38)
    at node:internal/child_process:744:35
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
  code: 'ERR_IPC_CHANNEL_CLOSED'
}

Node.js v18.13.0

The websocket connection remains. Any subsequent changes to the file get rebuilt by the remix dev server (which gets logged in the browser) but the changes don't reflect.

@bvandorn
Copy link

Looks to be an issue with the wrangler@3.9.0 cloudflare/workers-sdk#4008
Downgrading to 3.8 works for me.

@cairin
Copy link
Author

cairin commented Sep 22, 2023

Looks to be an issue with the wrangler@3.9.0 cloudflare/workers-sdk#4008 Downgrading to 3.8 works for me.

Yeah setting "wrangler": "3.8.0" fixes the issue.

Annoyingly the template is meant to install 3.1.1, but the latest is installed/used anyway.

@OnurGvnc
Copy link

for a temporary workaround: cloudflare/workers-sdk#4008 (comment)

@mrbbot
Copy link

mrbbot commented Sep 29, 2023

Hey! 👋 Apologies for this issue. It should be fixed in wrangler@3.10.1. 👍

@cairin
Copy link
Author

cairin commented Sep 29, 2023

Hey! 👋 Apologies for this issue. It should be fixed in wrangler@3.10.1. 👍

Indeed, it is fixed 🎉

@cairin cairin closed this as completed Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants