Skip to content

fix(start): make solid-js a peer dependency - #2343

Open
lxsmnsyc wants to merge 2 commits into
mainfrom
fix/solid-js-peer
Open

lxsmnsyc wants to merge 2 commits into
mainfrom
fix/solid-js-peer

Conversation

@lxsmnsyc

Copy link
Copy Markdown
Member

Fixes #2286.

@solidjs/start lists solid-js as a regular dependency (^1.9.14 in 2.0.0, ^1.9.15 now). When an app's solid-js version is outside that range, package managers install a second copy just for SolidStart. The two copies do not share reactive context. In the report, client-side navigation updated the URL but kept the old page, with TypeError: Cannot read properties of null (reading 'push') and nothing pointing at the cause.

1.x never listed solid-js at all, so it always used the app's copy. This is why the reporter only hit it after migrating to v2.

Fix

Move solid-js to peerDependencies with the same range, as @solidjs/router and @solidjs/meta already do, and keep it in devDependencies for the package's own build and tests. A version outside the range now shows up as a peer dependency warning at install time instead of a second copy.

For npm users, a solid-js version outside the range now fails npm install with a peer conflict instead of installing quietly. Apps in range are not affected.

Testing

A standalone app outside the monorepo (pnpm, @solidjs/router 0.16.3, vite 8.2.1, nitro), production build, clicking a link from / to /about in a browser:

@solidjs/start App solid-js Copies installed Result
2.0.6 from npm 1.9.10 1.9.10 and 1.9.17 URL changes, page stays on /, Cannot read properties of null (reading 'push')
packed from this branch 1.9.10 1.9.10 navigates, no errors, pnpm reports unmet peer solid-js
packed from this branch 1.9.17 1.9.17 navigates, no errors, no peer warnings

Solid's "multiple instances" warning is only in its dev build, so it did not appear in the production run.

In the repo: @solidjs/start test:ci (213 tests), typecheck, validate-imports and build pass, and apps/tests unit tests and Playwright e2e (42) pass. The lockfile change only moves solid-js from start's dependencies to its devDependencies.

Not in this PR

  • @solidjs/meta is also a regular dependency of start, but nothing in the package imports it. It could be removed separately.

🤖 Generated with Claude Code

@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 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dc871b7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit dc871b7
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6acdb9c543c2f4e8066d3cac
😎 Deploy Preview https://deploy-preview-2343--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/start@2343

commit: dc871b7

@@ -0,0 +1,5 @@
---
"@solidjs/start": patch

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this should be a minor version bump?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v2 migration: duplicate solid-js copies break client-side routing with unclear router error

2 participants