TanStack / TanStack/devtools

Solid.js 'multiple instances' warnings appear in React apps with Vite 8

Aperta
#411 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
TypeScript
Stelle
499
Fork
100
Merge medio
1g 17h
PR unite (30g)
4

Descrizione

TanStack Devtools version

@tanstack/react-devtools v0.10.1, @tanstack/devtools-vite v0.6.0

Framework/Library version

React 19.2.4, TanStack Start 1.167.16, Vite 8.0.3

Describe the bug and the steps to reproduce it

When using TanStack Devtools in a React TanStack Start app with Vite 8, the following warnings appear in the terminal and browser when starting the dev server

❯ bun run dev
$ vite dev --port 3000

  VITE v8.0.3  ready in 1039 ms

  ➜  Local:   http://localhost:3000/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
[vite] connected.
9:48:32 AM [vite] (client) [console.warn] You appear to have multiple instances of Solid. This can lead to unexpected behavior.
9:48:32 AM [vite] (client) [console.warn] You appear to have multiple instances of Solid. This can lead to unexpected behavior.
9:48:32 AM [vite] (client) [console.warn] computations created outside a `createRoot` or `render` will never be disposed
9:48:32 AM [vite] (client) [console.warn] computations created outside a `createRoot` or `render` will never be disposed
9:48:32 AM [vite] (client) [console.warn] cleanups created outside a `createRoot` or `render` will never be run
9:48:32 AM [vite] (client) [console.warn] computations created outside a `createRoot` or `render` will never be disposed
9:48:32 AM [vite] (client) [console.warn] computations created outside a `createRoot` or `render` will never be disposed
9:48:32 AM [vite] (client) [console.warn] cleanups created outside a `createRoot` or `render` will never be run
9:48:32 AM [vite] (client) [console.warn] computations created outside a `createRoot` or `render` will never be disposed
9:48:32 AM [vite] (client) [console.warn] cleanups created outside a `createRoot` or `render` will never be run
9:48:32 AM [vite] (client) [console.warn] cleanups created outside a `createRoot` or `render` will never be run
9:48:32 AM [vite] (client) [console.warn] computations created outside a `createRoot` or `render` will never be disposed

These warnings do not appear with Vite 7 using the exact same dependencies and configuration.

Steps to reproduce:

  1. Clone the repro repo and install dependencies:
    git clone https://github.com/abed-daloopa/tanstack-devtools-solid-warnings
    cd tanstack-devtools-solid-warnings
    bun install
    
  2. Run the dev server:
    bun run dev
    
  3. Open http://localhost:3000 — warnings appear in the browser console and terminal.

To verify Vite 8 is the cause, downgrade to Vite 7:

- "vite": "^8.0.3"
+ "vite": "^7.3.1"

Or add resolve.dedupe: ["solid-js"] to vite config

Reinstall and run ➡︎ warnings disappear.

Root cause: Vite 8 resolves Solid.js as multiple instances at runtime, even when only one copy exists in node_modules. Vite correctly deduplicates it.

Note: Adding resolve.dedupe: ["solid-js"] to the Vite config fixes the issue.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://github.com/abed-daloopa/tanstack-devtools-solid-warnings

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Maybe

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con la riproduzione minima collegata e la relativa configurazione di Vite, quindi confronta il comportamento del dev server con Vite 7 e Vite 8. Esamina l’integrazione Vite di TanStack devtools e il percorso di risoluzione di Solid.js segnalato; il lavoro è completato quando la configurazione di Vite 8 non emette più gli avvisi relativi all’istanza duplicata e allo smaltimento senza dipendere dal workaround di dedupe segnalato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
react, typescript, vite
Ambito
build-system, devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
52/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.