solidjs/solid · warning
You appear to have multiple instances of Solid. This can…
Error message
You appear to have multiple instances of Solid. This can lead to unexpected behavior.
What it means
Solid marks itself on globalThis.Solid$$ in dev; seeing the flag already set means two copies of solid-js are loaded. Duplicate instances have separate signal/owner registries, so reactivity, context, and ownership silently break across module boundaries. This is a dev-only console warning.
Solutions
- Run npm ls solid-js (or pnpm why solid-js) and align all packages on one version
- Force a single resolution via overrides/resolutions (npm: "overrides": { "solid-js": "^1.9.0" })
- In pnpm, dedupe or alias solid-js into a single instance in .npmrc or bundler config
Example fix
// before (package.json)
"dependencies": { "solid-js": "1.8.0", "some-lib": "^2.0.0" } // some-lib brings solid-js@1.9
// after
"dependencies": { "solid-js": "^1.9.0", "some-lib": "^2.0.0" },
"overrides": { "solid-js": "$solid-js" } Defensive patterns
Strategy: validation
Validate before calling
// package.json
{
"overrides": { "solid-js": "^1.9.0" }
}
// then: npm ls solid-js # exactly one version in the tree Prevention
- Pin a single solid-js version via overrides/resolutions
- Check npm ls solid-js after adding dependencies
- Alias solid-js to one path in bundler config for monorepos/symlinks
When it happens
Trigger: One dependency importing solid-js via a different specifier/version (e.g. a UI library depending on solid-js@1.x while the app pins a different copy); npm hoisting failures; symlinked packages; mixing ESM and CJS resolutions of solid-js.
Common situations: Adding a component library after the project exists; pnpm setups where a library resolves its own solid-js; duplicated solid in monorepos; bundler alias resolving to a second copy.
Related errors
- Attempting to use server context in non-server build
- Cannot mutate a Store directly
- cleanups created outside a `createRoot` or `render` will…
- computations created outside a `createRoot` or `render`…
- error handlers created outside a `createRoot` or `render`…
AI-assisted analysis of solidjs/solid@f47845f9cc (2026-08-27).
Data as JSON: /api/errors/b48929596ff73d52.
Report an issue: GitHub.
Appendix: source
Thrown at packages/solid/src/index.ts:87
export * from "./render/index.js";
import type { JSX } from "./jsx.js";
type JSXElement = JSX.Element;
export type { JSXElement, JSX };
// dev
import { registerGraph, writeSignal, DevHooks, IS_DEV } from "./reactive/signal.js";
export const DEV = IS_DEV ? ({ hooks: DevHooks, writeSignal, registerGraph } as const) : undefined;
// handle multiple instance check
declare global {
var Solid$$: boolean;
}
if (IS_DEV && globalThis) {
if (!globalThis.Solid$$) globalThis.Solid$$ = true;
else
console.warn(
"You appear to have multiple instances of Solid. This can lead to unexpected behavior."
);
}
View on GitHub (pinned to f47845f9cc)