Repository navigation
Description
TanStack Devtools version
v0.5.4
Framework/Library version
React 19.1.0
Describe the bug and the steps to reproduce it
When attempting to build the React "start" example using:
vite build && tsc --noEmitthe build fails with an error related to solid-js/web.
It seems the Devtools package includes precompiled Solid components in the core build, which causes issues in React projects.
A temporary workaround—marking Solid as external in vite.config.ts—works only when building directly from the source repository:
build: {
rollupOptions: {
external: ['solid-js', 'solid-js/web'],
},
},However, this workaround does not work when installing the package via pnpm in an external project, because the precompiled ESM already contains Solid imports. As a result, React projects cannot build the package without having Solid installed, which should not be required.
Error Output
✓ built in 7.66s
vite v7.0.6 building SSR bundle for production...
✓ 195 modules transformed.
✗ Build failed in 958ms
error during build:
../../../packages/devtools/dist/esm/components/content-panel.js (1:19): "use" is not exported by "../../../node_modules/.pnpm/solid-js@1.9.7/node_modules/solid-js/web/dist/server.js", imported by "../../../packages/devtools/dist/esm/components/content-panel.js".
file: C:/Users/Sylvain/Desktop/dev/devtools/packages/devtools/dist/esm/components/content-panel.js:1:19
1: import { template, use, insert, memo, addEventListener, effect, className, delegateEvents } from "solid-js/web";
^
2: import { useDevtoolsSettings } from "../context/use-devtools-context.js";
3: import { useStyles } from "../styles/use-styles.js";
at getRollupError (...)
at error (...)
at Module.error (...)
...
Steps to Reproduce
- Clone this repo
- Run
pnpm i - Run
pnpm dev - Navigate to
cd .\examples\react\start\ - Run:
vite build && tsc --noEmit
Current Behavior
- Build fails due to
solid-js/webimport ("use"not exported).
Expected Behavior
- The project should build successfully without requiring Solid to be marked as external in Vite config.
Additional Notes
I am trying to better understand how Vite’s Rollup integration and the devtools package work in order to investigate further, but I’m not sure if I’ll be able to fully resolve this issue on my own.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
this repo
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.
Activity
sprusak commentedon Sep 5, 2025
I've tried to dig into this issue, and looks like devtools package relies on some client only features from solid-js, that are not exported from @solid-js/web via server build. Just looking at @solid-js/web package.json I can see this mapping:
Which means that ssr build will resolve @solid-js/web to
./dist/server.jsinstead of./dist/web.js.One solution that I see is to provide a dedicated build for the server, that won't do anything (devtools are rendered on client anyway) or try to figure out which exact features of solid-js causes this issue, as this happens only while using
@tanstack/react-devtoolsand this issue does not happen for eg.@tanstack/react-query-devtoolssprusak commentedon Sep 5, 2025
@AlemTuzlak I prepared a PR please check if this fix makes sense #109
AlemTuzlak commentedon Sep 5, 2025
Wow, thank you so much for this, I finally understand what the issue is! I'll test it out right away
AlemTuzlak commentedon Sep 5, 2025
Fixed with #109
Asjas commentedon Oct 9, 2025
This appears to have broken again in @tanstack/react-router-devtools version 1.132.51. Downgrading to 1.132.50 works.
tsteckenborn commentedon Nov 24, 2025
Having a similar issue (I suppose) with
KurtJHC commentedon Dec 11, 2025
also broken with react-form-devtools