diff --git a/.changeset/solid-js-peer.md b/.changeset/solid-js-peer.md new file mode 100644 index 000000000..e73a2b59e --- /dev/null +++ b/.changeset/solid-js-peer.md @@ -0,0 +1,5 @@ +--- +"@solidjs/start": patch +--- + +Make `solid-js` a peer dependency instead of a regular one. When an app's `solid-js` version was outside the range SolidStart asked for, package managers installed a second copy just for SolidStart. The two copies did not share reactive context, so client-side navigation broke with `TypeError: Cannot read properties of null (reading 'push')`. SolidStart now uses the app's `solid-js`, and a version outside the supported range shows up as a peer dependency warning at install time. diff --git a/packages/start/package.json b/packages/start/package.json index a6137a0d4..106d79b19 100644 --- a/packages/start/package.json +++ b/packages/start/package.json @@ -79,7 +79,6 @@ "seroval": "^1.6.8", "seroval-plugins": "^1.6.8", "shiki": "^4.3.1", - "solid-js": "^1.9.15", "srvx": "^0.12.4", "terracotta": "^1.2.4", "vite-plugin-solid": "^2.11.13" @@ -87,11 +86,13 @@ "devDependencies": { "@types/babel__core": "^7.20.5", "@types/node": "^26.1.1", + "solid-js": "^1.9.15", "vite": "^8.1.5", "vitest": "^4.1.10" }, "peerDependencies": { "@solidjs/router": ">=0.16.0 <2.0.0-0", + "solid-js": "^1.9.15", "vite": "^8 || ^9" }, "peerDependenciesMeta": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 65b914178..6b1868754 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -377,9 +377,6 @@ importers: shiki: specifier: ^4.3.1 version: 4.3.1 - solid-js: - specifier: ^1.9.15 - version: 1.9.15 srvx: specifier: ^0.12.4 version: 0.12.4 @@ -396,6 +393,9 @@ importers: '@types/node': specifier: ^26.1.1 version: 26.1.1 + solid-js: + specifier: ^1.9.15 + version: 1.9.15 vite: specifier: ^8.1.5 version: 8.1.5(@types/node@26.1.1)(esbuild@0.27.4)(jiti@2.7.0)(terser@5.46.0)