{"record":{"id":"b48929596ff73d52","repo":"solidjs/solid","slug":"you-appear-to-have-multiple-instances-of-solid-th","errorCode":null,"errorMessage":"You appear to have multiple instances of Solid. This can lead to unexpected behavior.","messagePattern":"You appear to have multiple instances of Solid\\. This can lead to unexpected behavior\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/solid/src/index.ts","lineNumber":87,"sourceCode":"export * from \"./render/index.js\";\n\nimport type { JSX } from \"./jsx.js\";\ntype JSXElement = JSX.Element;\nexport type { JSXElement, JSX };\n\n// dev\nimport { registerGraph, writeSignal, DevHooks, IS_DEV } from \"./reactive/signal.js\";\nexport const DEV = IS_DEV ? ({ hooks: DevHooks, writeSignal, registerGraph } as const) : undefined;\n\n// handle multiple instance check\ndeclare global {\n  var Solid$$: boolean;\n}\n\nif (IS_DEV && globalThis) {\n  if (!globalThis.Solid$$) globalThis.Solid$$ = true;\n  else\n    console.warn(\n      \"You appear to have multiple instances of Solid. This can lead to unexpected behavior.\"\n    );\n}\n","sourceCodeStart":69,"sourceCodeEnd":91,"githubUrl":"https://github.com/solidjs/solid/blob/f47845f9cc16ecbb316aa6560c7161f45af9a3d8/packages/solid/src/index.ts#L69-L91","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before (package.json)\n\"dependencies\": { \"solid-js\": \"1.8.0\", \"some-lib\": \"^2.0.0\" } // some-lib brings solid-js@1.9\n\n// after\n\"dependencies\": { \"solid-js\": \"^1.9.0\", \"some-lib\": \"^2.0.0\" },\n\"overrides\": { \"solid-js\": \"$solid-js\" }","handlingStrategy":"validation","validationCode":"// package.json\n{\n  \"overrides\": { \"solid-js\": \"^1.9.0\" }\n}\n// then: npm ls solid-js  # exactly one version in the tree","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["solid","duplicate-packages","npm","bundling","dev-warning"],"backgroundTag":"duplicate-library-instances","analyzedSha":"f47845f9cc16ecbb316aa6560c7161f45af9a3d8","analyzedAt":"2026-08-27T05:39:24.283Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}