Repository navigation
Closed
Description
Which project does this relate to?
Start
Describe the bug
After setting up the Cloudflare plugin on a @tanstack/solid-start project, the dev server gives this error on start:
error when starting dev server:
Error: The following environment options are incompatible with the Cloudflare Vite plugin:
- "ssr" environment: `resolve.external`: ["@solid-primitives/refs","tiny-invariant","@tanstack/history","@solid-devtools/logger","@tanstack/router-core","tiny-warning","isbot","@tanstack/store"]
To resolve this issue, avoid setting `resolve.external` in your Cloudflare Worker environments.
at validateWorkerEnvironmentOptions (file:///Users/jakst/code/tmp/solid-start-solid-rc-broken/node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/node_modules/@cloudflare/vite-plugin/dist/index.js:17244:11)
at BasicMinimalPluginContext.configResolved (file:///Users/jakst/code/tmp/solid-start-solid-rc-broken/node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]/node_modules/@cloudflare/vite-plugin/dist/index.js:17373:11)
at file:///Users/jakst/code/tmp/solid-start-solid-rc-broken/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-Bm2ujbhY.js:35994:87
at Array.map (<anonymous>)
at resolveConfig (file:///Users/jakst/code/tmp/solid-start-solid-rc-broken/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-Bm2ujbhY.js:35994:68)
at async _createServer (file:///Users/jakst/code/tmp/solid-start-solid-rc-broken/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-Bm2ujbhY.js:28008:67)
at async CAC.<anonymous> (file:///Users/jakst/code/tmp/solid-start-solid-rc-broken/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/cli.js:573:18)
ELIFECYCLE Command failed with exit code 1.
Running pnpm vite build && pnpm wrangler dev or pnpm vite preview, works as expected.
Note that I haven't tried any of the actual integrations with Cloudflare. This is just for getting it running.
Your Example Website or App
Steps to Reproduce the Bug or Issue
- Clone the repo
- Make sure you are on the
cloudflare-brokenbranch - Install deps
- Run
pnpm dev. You should get the error message from above.
Expected behavior
I expect the dev server to work when using the Cloudflare Vite plugin with Tanstack Solid Start.
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.132.23/1.132.24
- OS: MacOs v15.6.1
- Browser: Chrome
- Browser Version: v140
- Bundler: Vite
- Bundler Version: 7.1.7
Additional context
No response
Reacted by Tao Bojlén
Metadata
Metadata
Assignees
Labels
No labels
Activity
schiller-manuel commentedon Sep 29, 2025
reported upstream issue
HoaX7 commentedon Oct 2, 2025
@jakst can you share your
vite.config.ts? Im facing same issue even with the workaround. I keep getting this errorgetContextId cannot be used under non-hydrating contextwith tanstack start + solid + cloudflare. This only happens in dev.HoaX7 commentedon Oct 2, 2025
@schiller-manuel any insights?
jakst commentedon Oct 2, 2025
@HoaX7 I used the workaround that someone commented on Manuel's upstream issue.
Add this to the vite plugin list
HoaX7 commentedon Oct 2, 2025
@jakst I used this workaround too but then ran into other issues. Were you able to run everything locally in dev? I pulled your code and tried it myself and ran into issues.
I created an issue #5338 explaining the bug
jakst commentedon Oct 2, 2025
Interesting. You're right, that issue is there on my reproduction. I'm not getting it on our main application, which is where I used the workaround. I wonder why I'm not seeing it there 🤔
HoaX7 commentedon Oct 2, 2025
maybe you have a different config? can you help me with the plumbing if you dont mind. otherwise im thinking of moving to solid start haha until tanstack is more stable
jakst commentedon Oct 2, 2025
I might be able too look into what makes the difference in a bit, but until then, I'd recommend just going with v1.131.x. It works great for us for now. We had a bunch of issues with solid-start with Cloudflare as well, so I wouldn't count on that path being smooth sailing either. They're also ditching vinxi in a bit which is bound to create some more breakage.
HoaX7 commentedon Oct 2, 2025
Thanks! Appreciate it
chore: defer web app deploy — SolidJS CF worker bundling issue