From f40076a7e069828946b6a7a70a252df4eba23eab Mon Sep 17 00:00:00 2001 From: "Alexis H. Munsayac" Date: Tue, 13 Oct 2026 11:22:08 +0800 Subject: [PATCH] fix(start): make solid-js a peer dependency @solidjs/start listed solid-js as a regular dependency. When an app's solid-js version was outside that range, package managers installed a second copy just for SolidStart. The two copies did not share reactive context, so client-side navigation failed with "Cannot read properties of null (reading 'push')" and no hint at the cause. Move solid-js to peerDependencies with the same range, like @solidjs/router and @solidjs/meta, and keep it in devDependencies for the package's own build and tests. Fixes #2286. Co-Authored-By: Claude Opus 5.5 --- .changeset/solid-js-peer.md | 5 +++++ packages/start/package.json | 3 ++- pnpm-lock.yaml | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .changeset/solid-js-peer.md 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 679eea156..0eaa0dde9 100644 --- a/packages/start/package.json +++ b/packages/start/package.json @@ -76,7 +76,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" @@ -84,11 +83,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)