Solid.js 'multiple instances' warnings appear in React apps with Vite 8
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 499
- フォーク
- 100
- 平均マージ
- 1日 17時間
- マージ済み PR(30日)
- 4
説明
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:
- 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 - Run the dev server:
bun run dev - 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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされている最小再現例とその Vite 設定から始め、Vite 7 と Vite 8 での dev-server の動作を比較します。TanStack devtools の Vite 統合と、報告されている Solid.js の解決パスを調査します。完了条件は、報告されている dedupe workaround に頼らず、Vite 8 のセットアップで重複インスタンスおよび破棄に関する警告が出なくなることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react, typescript, vite
- 領域
- build-system, devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100