Building for Cloudflare and getting "Readable" is not exported by "__vite-browser-external"
Hey everyone !
I've been building a project with Start for the past few weeks without thinking too much into deployment.
Today I've been trying to build a first version to host on Cloudflare but unfortunately I can't pass the build step locally.
I followed the documentation and then proceed to run
npm run build
which gives me the output attached in the message.
The logs give no indication on where in my code I might have made a mistake.
Has anyone experienced something similar and knows what I can do to track down the problem?
Thanks a lot!9 Replies
helpful-purple•5mo ago
did you try remove node_modules and maybe package lock and do a fresh install ?
adverse-sapphireOP•5mo ago
I just did after reading your message and got the same error, I am already having a few issues with react 19 requiring
npm install --force
since some packages are not up to date yethelpful-purple•5mo ago
delete also build folder like .output .vinxi .wrangler
I faced the same issue two days ago
adverse-sapphireOP•5mo ago
Hum unless they're not at the root of the project, I don't have any of those folders here
``
helpful-purple•5mo ago
https://github.com/TanStack/router/issues/4022 check this, it could be something with server function import
GitHub
Readable is not exported by __vite-browser-external · Issue #4022 ...
Which project does this relate to? Start Describe the bug The issue i having is during anytime i try to create a production build for my app. i kept getting the error in the title and i don't k...
adverse-sapphireOP•5mo ago
This is definetely the issue I'm experiencing, but like it is said in the comments, finding the source of the problem without pin pointing the file is going to be a nightmare 🥲
helpful-purple•5mo ago
yes sure :/
adverse-sapphireOP•5mo ago
Found it
Indirect reference to a server function two import hops away from a view
Thanks !
unwilling-turquoise•4mo ago
Any advice on debugging this? I've been working on this app for like 2 months in dev, I don't even know where to begin to find the root cause
Welp. Turns out AI is fairly decent at this type of thing. Think I solved it, ignore that ^ 🙂