TanStack / TanStack/devtools

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

Abierto
#411 6 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
TypeScript
Estrellas
499
Forks
100
Merge medio
1 d 17 h
PR fusionados (30 d)
4

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con la reproducción mínima enlazada y su configuración de Vite, y después compara el comportamiento del servidor de desarrollo con Vite 7 y Vite 8. Inspecciona la integración de Vite de TanStack devtools y la ruta de resolución de Solid.js indicada; se considera terminado cuando la configuración de Vite 8 ya no emite las advertencias de instancia duplicada y de liberación sin depender del workaround de dedupe indicado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
react, typescript, vite
Área
build-system, devtools
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
52/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.