cloudflare deployment error: No such module 'node:http' imported from 'chunks/nitro/nitro.mjs
I get the error below when I try to deploy to cloudflare pages:
Has anyone experienced this? I followed the deployment instruction from the docs https://tanstack.com/start/latest/docs/framework/react/hosting#cloudflare-pages
// app.config.ts
wrangler.toml
package.json
Is it normal to have imports like below in
dist/_worker.js/chunks/nitro/nitro.mjs
?
Hosting | TanStack Start React Docs
Hosting is the process of deploying your application to the internet so that users can access it. This is a critical part of any web development project, ensuring your application is available to the...
7 Replies
other-emerald•7mo ago
Hello! I'm encountering the same issue. I opened a thread on this with a minimal repo to reproduce it and going to open a Github issue soon if I can't solve first.
From what I've experienced, downgrading to 1.81 solves it.
I found this Github issue to be related if you're interested.
GitHub
Code Splitting Issues with TanStack Start and Cloudflare Pages Depl...
Which project does this relate to? Start Describe the bug I'm experiencing issues with code splitting when deploying a TanStack Start project to Cloudflare Pages. The application appears to be ...
unwilling-turquoise•7mo ago
Facing the same issue,
wise-white•7mo ago
was getting it and fixed by wrapping my node code in createServerFn. -- previously i was calling certain nodejs apis inside of a routeloader wrapped in if(typeof window === 'undefined')
this prevented it at crashing during dev mode at runtime, but caused problems during the build
unwilling-turquoise•7mo ago
i do not have any build time issues, this only happens when it builds for cloudflare, it builds successfully but fails to deploy on cloudflare pages.
vicious-gold•7mo ago
same issue
psychological-ivory•7mo ago
facing the same issue , trying to upload the basic example
unwilling-turquoise•7mo ago
I'm unable to release the new version of my webapp