T
TanStack•5mo ago
adverse-sapphire

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.
"Readable" is not exported by "__vite-browser-external"
"Readable" is not exported by "__vite-browser-external"
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
helpful-purple•5mo ago
did you try remove node_modules and maybe package lock and do a fresh install ?
adverse-sapphire
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 yet
helpful-purple
helpful-purple•5mo ago
delete also build folder like .output .vinxi .wrangler I faced the same issue two days ago
adverse-sapphire
adverse-sapphireOP•5mo ago
Hum unless they're not at the root of the project, I don't have any of those folders here
drwxr-xr-x@ 22 a staff 704 28 avr 11:29 .
drwxr-xr-x 13 a staff 416 31 mar 17:07 ..
-rw-r--r--@ 1 a staff 6148 31 mar 16:25 .DS_Store
-rw-r--r--@ 1 a staff 304 22 avr 09:20 .env
drwxr-xr-x@ 14 a staff 448 28 avr 11:16 .git
-rw-r--r--@ 1 a staff 473 31 mar 15:51 .gitignore
-rw-r--r--@ 1 a staff 51 31 mar 17:23 .prettierignore
-rw-r--r--@ 1 a staff 57 31 mar 17:18 .prettierrc
drwxr-xr-x@ 3 a staff 96 3 avr 19:23 .vscode
-rw-r--r--@ 1 a staff 758 28 avr 10:27 app.config.ts
-rw-r--r--@ 1 a staff 478 8 avr 15:54 components.json
-rw-r--r--@ 1 a staff 677 31 mar 17:24 eslint.config.mjs
drwxr-xr-x@ 632 a staff 20224 28 avr 11:29 node_modules
-rw-r--r--@ 1 a staff 512 17 avr 17:35 openapi-ts.config.js
-rw-r--r--@ 1 a staff 685454 28 avr 11:27 package-lock.json
-rw-r--r--@ 1 a staff 2689 28 avr 11:23 package.json
-rw-r--r--@ 1 a staff 70 1 avr 08:01 postcss.config.ts
drwxr-xr-x@ 6 a staff 192 11 avr 10:55 src
-rw-r--r--@ 1 a staff 538 18 avr 11:27 tsconfig.json
-rw-r--r--@ 1 a staff 214 8 avr 19:52 vite.config.ts
-rw-r--r--@ 1 a staff 236507 28 avr 10:30 worker-configuration.d.ts
-rw-r--r--@ 1 a staff 477 28 avr 10:29 wrangler.jsonc
drwxr-xr-x@ 22 a staff 704 28 avr 11:29 .
drwxr-xr-x 13 a staff 416 31 mar 17:07 ..
-rw-r--r--@ 1 a staff 6148 31 mar 16:25 .DS_Store
-rw-r--r--@ 1 a staff 304 22 avr 09:20 .env
drwxr-xr-x@ 14 a staff 448 28 avr 11:16 .git
-rw-r--r--@ 1 a staff 473 31 mar 15:51 .gitignore
-rw-r--r--@ 1 a staff 51 31 mar 17:23 .prettierignore
-rw-r--r--@ 1 a staff 57 31 mar 17:18 .prettierrc
drwxr-xr-x@ 3 a staff 96 3 avr 19:23 .vscode
-rw-r--r--@ 1 a staff 758 28 avr 10:27 app.config.ts
-rw-r--r--@ 1 a staff 478 8 avr 15:54 components.json
-rw-r--r--@ 1 a staff 677 31 mar 17:24 eslint.config.mjs
drwxr-xr-x@ 632 a staff 20224 28 avr 11:29 node_modules
-rw-r--r--@ 1 a staff 512 17 avr 17:35 openapi-ts.config.js
-rw-r--r--@ 1 a staff 685454 28 avr 11:27 package-lock.json
-rw-r--r--@ 1 a staff 2689 28 avr 11:23 package.json
-rw-r--r--@ 1 a staff 70 1 avr 08:01 postcss.config.ts
drwxr-xr-x@ 6 a staff 192 11 avr 10:55 src
-rw-r--r--@ 1 a staff 538 18 avr 11:27 tsconfig.json
-rw-r--r--@ 1 a staff 214 8 avr 19:52 vite.config.ts
-rw-r--r--@ 1 a staff 236507 28 avr 10:30 worker-configuration.d.ts
-rw-r--r--@ 1 a staff 477 28 avr 10:29 wrangler.jsonc
``
helpful-purple
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-sapphire
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
helpful-purple•5mo ago
yes sure :/
adverse-sapphire
adverse-sapphireOP•5mo ago
Found it Indirect reference to a server function two import hops away from a view Thanks !
unwilling-turquoise
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 ^ 🙂

Did you find this page helpful?