Skip to content

Support @solidjs/router 0.16 (duplicate router instances when the app upgrades) #156

Description

@daveycodez

Summary

SolidBase declares "@solidjs/router": "^0.15.3" as a regular dependency. When an app upgrades its own router to ^0.16, package managers install two router copies (0.15.x for SolidBase, 0.16.x for the app). The two instances don't share router context, and every SSR request fails:

Error: <A> and 'use' router primitives can be only used inside a Route.

(dev server returns 500 on every page; reproduced with bun's isolated linker, where SolidBase always gets its own 0.15.x copy.)

What we verified

Forcing a single shared copy via a root override:

"overrides": { "@solidjs/router": "^0.16.2" }

works — SolidBase 0.6.9 runs fine against router 0.16.2 (docs build, SSG prerender, and dev SSR all verified), so there doesn't appear to be an actual API incompatibility, just the range.

Suggested fix

Either:

  • widen the range to "^0.15.3 || ^0.16.0", or
  • (better long-term) declare @solidjs/router as a peer dependency, like solid-js and vite already are — the router must be a singleton shared with the host app, which is exactly what peer deps express.

Environment

  • @kobalte/solidbase 0.6.9
  • @solidjs/router 0.16.2 (app) / 0.15.4 (SolidBase's copy)
  • @solidjs/start 2.0.0-beta.0, vite 8.1.5, bun 1.3.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions