T
TanStack•2mo ago
continuing-cyan

"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-cyan
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-cyan
continuing-cyanOP•2mo ago
No description
xenophobic-harlequin
xenophobic-harlequin•2mo ago
Are you using devtools? I had the same message after installing devtools
deep-jade
deep-jade•2mo ago
most of tanstack's devtools like router & query use solidjs so that's probably it tanstack/devtools as well
continuing-cyan
continuing-cyanOP•2mo ago
i am indeed ! that's probably it
xenophobic-harlequin
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
genetic-orange•2mo ago
yes its due to the devtools, having the same problem after installing them
No description
absent-sapphire
absent-sapphire•6h ago
Manage to mute it with
resolve: {
alias: { 'solid-js': path.resolve(__dirname, 'node_modules/solid-js') },
},
resolve: {
alias: { 'solid-js': path.resolve(__dirname, 'node_modules/solid-js') },
},
stormy-gold
stormy-gold•4h ago
@Alem Tuzlak should we add something like that to the vite plugin?
sensitive-blue
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
stormy-gold•3h ago
why? we need to resolve modules instead of assuming some location . we do this in start already
sensitive-blue
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
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
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
stormy-gold•2h ago
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
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
sensitive-blue•2h ago
Yes Awesome this is a great starting point Thanks!

Did you find this page helpful?