"Multiple instances of Solid" even when using React
GitHub
"Multiple instances of Solid" even when using React · Issue #4936 ...
Which project does this relate to? Start Describe the bug With the latest versions of Start (not Router), a warning has been appearing in the web console that states that multiple instances of Soli...
17 Replies
continuing-cyanOP•2mo ago
With the latest versions of Start (not Router), a warning has been appearing in the web console that states that multiple instances of Solid are used, even though it's a React project.
continuing-cyanOP•2mo ago

xenophobic-harlequin•2mo ago
Are you using devtools? I had the same message after installing devtools
deep-jade•2mo ago
most of tanstack's devtools like router & query use solidjs so that's probably it
tanstack/devtools as well
continuing-cyanOP•2mo ago
i am indeed !
that's probably it
xenophobic-harlequin•2mo ago
I sent this message in the #devtools group. I think the problem is related to router or query dev tools.
genetic-orange•2mo ago
yes its due to the devtools, having the same problem after installing them

absent-sapphire•6h ago
Manage to mute it with
stormy-gold•4h ago
@Alem Tuzlak should we add something like that to the vite plugin?
sensitive-blue•3h ago
Hmm we could 🤔
Would this work with pnpm as well
I'd rather find a way that doesn't include vite 🤔
stormy-gold•3h ago
why?
we need to resolve modules instead of assuming some location . we do this in start already
sensitive-blue•3h ago
I just don't understand why this happens
I'd expect it to be deduped by the package manager
Not vite
stormy-gold•2h ago
well the react vite plugin also explicitly dedupes react
so maybe solid vite plugin should so the same?
cc @brenelz
sensitive-blue•2h ago
Interesting, yeah maybe, I'd just like to know the how, you'd expect it to work properly, if the react plugin does that then maybe indeed it's a vite thing rather than a package manager thing 🤔
stormy-gold•2h ago
oh well it already does this
https://github.com/solidjs/vite-plugin-solid/blob/main/src%2Findex.ts#L273
GitHub
vite-plugin-solid/src/index.ts at main · solidjs/vite-plugin-solid
A simple integration to run solid-js with vite. Contribute to solidjs/vite-plugin-solid development by creating an account on GitHub.
stormy-gold•2h ago
but of course that plugin is not active here
since we are in react world ultimately
so we need to replicate the solid deduping in the DevTools vite plugin
sensitive-blue•2h ago
Yes
Awesome this is a great starting point
Thanks!