Repository navigation
Incompatibility with Cloudflare Vite Plugin #375
Copy link
Copy link
Open
Description
TanStack Devtools version
0.9.9
Framework/Library version
Tanstack start RC (1.132.0)
Describe the bug and the steps to reproduce it
-
Create a tanstack start project from scratch
-
Follow the official guide for configuring tanstack start with cloudflare:
- Install the different tanstack plugins.
I managed to replicate them using these versions:
- "@tanstack/react-query-devtools": "^5.84.2"
- "@tanstack/react-form-devtools": "^0.2.17"
- "@tanstack/react-pacer-devtools": "^0.5.2"
- "@tanstack/react-router-devtools": "^1.132.0"
- Try to import the plugins and add them to
<TanStackDevTools/>
function RootDocument({ children }: Props) {
return (
<html>
<head>
<HeadContent />
</head>
<body>
<TanStackDevtools
plugins={[
{
name: "Tanstack Router",
render: <TanStackRouterDevtoolsPanel />,
},
{
name: "Tanstack Query",
render: <ReactQueryDevtoolsPanel />,
},
// These last two break the app when executing anything SSR
{
name: "Tanstack Form",
render: <FormDevtoolsPanel />,
},
{
name: "Tanstack Pacer",
render: <PacerDevtoolsPanel />,
},
]}
/>
<Scripts />
</body>
</html>
);
}The issue only occurs when executing anything SSR:
✘ [ERROR] No matching export in "node_modules/.pnpm/solid-js@1.9.10/node_modules/solid-js/web/dist/server.js" for import "use"
node_modules/.pnpm/@tanstack+devtools-utils@0.3.1_@types+react@19.2.2_csstype@3.1.3_react@19.2.0_solid-js@1.9.10/node_modules/@tanstack/devtools-utils/dist/solid/esm/dev.js:1:34:
1 │ ...eateComponent, insert, use, template } from 'sol...
╵ ~~~
Plugins affected
Funningly enough, this only happens with certain plugins. Some plugins work and some other's don't. Here's the list of what I've experienced:
- Tanstack Router ✔️
- Tanstack Query ✔️
- Tanstack Pacer ❌
- Tanstack Form ❌
Temporary fix
The issue disapears when I remove the cloudflare plugin. As I use this only for develpoment purposes, I can simply comment the code out, use the plugin and then put it back in when im done with development.
Thank you!
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://github.com/randreu28/devtools_issue_375
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Incopatbility with Cloudflare[/-][+]Incopatbility with Cloudflare Vite Plugin[/+]github-actions commentedon Mar 10, 2026
Hi @randreu28, thanks for reporting this! The bug description and reproduction steps are very thorough 🙏
However, the Minimal, Reproducible Example field is a required part of the bug report template, and it looks like it wasn't filled in. Could you please provide a link to a minimal reproduction (e.g. a CodeSandbox or StackBlitz project)?
A runnable example helps maintainers verify and debug the issue much faster. You can fork one of the official examples as a starting point if that's easier.
Thanks!
randreu28 commentedon Mar 10, 2026
Added a reproducable example
[-]Incopatbility with Cloudflare Vite Plugin[/-][+]Incompatibility with Cloudflare Vite Plugin[/+]AlemTuzlak commentedon Mar 10, 2026
This should be a by-product of the changes to the architecture of the new plugins, working on it already
harry-whorlow commentedon Mar 10, 2026
Form's plugin is here, I'm just working on the bundling
harry-whorlow commentedon Mar 12, 2026
@randreu28 if you update tanstack form's plugin and confirm if it's fixed it would be incredibly helpful 🙏
randreu28 commentedon Mar 13, 2026
Hello! Thank you for the quick reply 🚀
The issue still remains. You can see the dependency versions I used for my test here:
randreu28/devtools_issue_375@3957a9e
I also tried testing it only using the form's plugin and the error still remains the same:
harry-whorlow commentedon Mar 13, 2026
@randreu28, can you give me the error from Form? Pacer although merged, hasn’t been released and published yet
randreu28 commentedon Mar 16, 2026
@harry-whorlow It's the same.
This is the code that I used to replicate it. It's the same as my original minimal reproducable example, but exclusively with the form plugin.
https://github.com/randreu28/devtools_issue_375/tree/form-only
harry-whorlow commentedon Mar 16, 2026
Okay, I'll take a look after work.
chshouyu commentedon Mar 20, 2026
I found some other errors, when modifying a route file that incorporates
createServerFn, it sometimes throws an error like this:or like this:
or like this:
randreu28 commentedon Mar 23, 2026
@chshouyu Yeah those are expected. Just noise, not related to the issue at hand. I've worked with tanstack start + cloudflare for a bit and I recognize them. They are thrown when any SSR error occurs.
One is a simple warning for a missing default component. You can read more about here
The other is a known bug that occurs exclusively on development builds, after hot reload and its related to Cloudflare and it's Vite plugin. You can read more about here and here.
I've updated the repo I used for replicating this issue with a couple of fixes so that these unrelated errors do not disturb. If you still experience any errors related to the request context, consider not relying too much on the hot reload.
chshouyu commentedon Mar 23, 2026
@randreu28 Understood. Thank you very much.
ebrahimelmwafy2-droid commentedon Mar 24, 2026
Hi @harry-whorlow and @randreu28,
I’ve reproduced this issue on my machine using the provided example. The error is quite clear: setStyleProperty and use are being imported from solid-js/web in an SSR/Worker environment (Cloudflare), but these functions are only exported in the client-side bundle of SolidJS, not in the dist/server.js.
It seems like the Pacer and Form devtools components (specifically in Shell.js) are trying to access DOM-specific utilities during the Nitro server build.
Proposed Fix:
We should wrap these imports or the logic using them in a check to ensure they only run on the client side, or update the bundling process to handle solid-js/web exports correctly for SSR targets.
Happy to help test any experimental branch!
harry-whorlow commentedon Mar 25, 2026
I think this can be avoided if we use goober as opposed to just directly setting the style.
I've opened a pr that might fix it✈️
npm i https://pkg.pr.new/@tanstack/react-form-devtools@f8c41a0you can try it out if you like, I have to rush off unfortunately as I've got a conference to go to.ebrahimelmwafy2-droid commentedon Mar 25, 2026
"Hi @harry-whorlow, I just ran the build using NX and pnpm. Everything built successfully for all 12 projects! The bundle sizes are within limits, and the import.meta warnings are expected for this target. I'm ready to test this in my Cloudflare environment now. Great job on the goober implementation!"
VesperQuartz commentedon Aug 10, 2026
I am also facing this issue with Tanstack start and cloudflare. I am also not using solid router