GeezerVison is showing github.com — fix(create): repair router-only package manifests by jingjing2222 · Pull Request #482 · TanStack/cli
Conversation
jingjing2222
commented
Jul 4, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
- Add
@tanstack/router-core to router-only React and Solid app dependencies so generated devtools resolve under strict package managers like Yarn PnP.
- Keep
@tanstack/router-plugin in devDependencies only for file-router templates, avoiding duplicate dependency/devDependency entries.
- Preserve the existing router plugin version when router-only compatibility code moves it between package sections.
Reproduction
Reproduction repo: https://github.com/jingjing2222/tanstack-router-pnp-peer-repro
The repo contains two workspaces:
apps/repro: generated with yarn dlx @tanstack/cli create --router-only ...
apps/fixed: same app with only package manifest fixes applied
yarn dev:repro fails during Vite dependency optimization because @tanstack/router-devtools-core imports @tanstack/router-core, but the generated app does not provide it directly.
Failure screenshot: https://github.com/jingjing2222/tanstack-router-pnp-peer-repro/blob/main/docs/assets/repro-fails.png
yarn dev:fixed starts successfully after adding @tanstack/router-core and removing the duplicate @tanstack/router-plugin dependency entry.
Success screenshot: https://github.com/jingjing2222/tanstack-router-pnp-peer-repro/blob/main/docs/assets/fixed-starts.png
Summary by CodeRabbit
- Bug Fixes
- Generated React and Solid projects that include router devtools now also include the router core package. This keeps the generated dependency setup complete for projects using those devtools, reducing the need to add the package manually.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Jul 4, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
The generated React and Solid devtools dependency sets now include @tanstack/router-core at latest. A patch changeset records the generated-app dependency update.
Changes: Generated router devtools dependencies
| Layer / File(s) |
Summary |
Devtools dependencies and changeset packages/create/src/frameworks/react/project/packages.json, packages/create/src/frameworks/solid/project/packages.json, .changeset/tidy-spoons-dream.md |
The React and Solid devtools dependency sets add @tanstack/router-core at latest. The changeset records a patch for @tanstack/create and @tanstack/cli. |
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Bug fix
Possibly related PRs
- TanStack/cli#481: Updates router-only initialization and Query provider dependencies in generated applications.
Suggested reviewers: edukegler
Merge Risk: Minimal · up to 13730
-
The router-core dependency is included in generated React and Solid devtools manifests, with no remaining merge-blocking risk identified.
Pre-merge checks: 5
-
| Check name |
Status |
Explanation |
| Description Check |
 |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
 |
The title clearly and concisely describes the main change: repairing generated router-only package manifests. |
| Docstring Coverage |
 |
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
Recent review info
-
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ac372988-6cf0-4e75-8386-62409034bec6
Commits
-
Reviewing files that changed from the base of the PR and between 0a82014 and 1373099.
Files selected for processing: 3
-
.changeset/tidy-spoons-dream.md
packages/create/src/frameworks/react/project/packages.json
packages/create/src/frameworks/solid/project/packages.json
Files skipped from review as they are similar to previous changes: 1
-
- .changeset/tidy-spoons-dream.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick comments (1)
packages/create/src/package-json.ts (1)
136-169: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Duplicate router-plugin/router-core handling between react and solid branches.
The routerPluginVersion computation, moving @tanstack/router-plugin to devDependencies, and adding @tanstack/router-core to dependencies is copy-pasted verbatim across the react and solid branches. Extracting a shared helper would reduce duplication and the risk of the two branches drifting apart on future edits.
♻️ Suggested refactor
+ function applyRouterOnlyCompat() {
+ const routerPluginVersion =
+ packageJSON.devDependencies?.['`@tanstack/router-plugin`'] ??
+ packageJSON.dependencies?.['`@tanstack/router-plugin`'] ??
+ 'latest'
+ delete packageJSON.dependencies?.['`@tanstack/router-plugin`']
+ packageJSON.devDependencies = {
+ ...(packageJSON.devDependencies ?? {}),
+ '`@tanstack/router-plugin`': routerPluginVersion,
+ }
+ packageJSON.dependencies = {
+ ...(packageJSON.dependencies ?? {}),
+ '`@tanstack/router-core`':
+ packageJSON.dependencies?.['`@tanstack/router-core`'] ?? 'latest',
+ }
+ }
+
if (options.routerOnly) {
if (options.framework.id === 'react') {
delete packageJSON.dependencies?.['`@tanstack/react-start`']
delete packageJSON.dependencies?.['`@tanstack/react-router-ssr-query`']
- const routerPluginVersion = ...
- ...
+ applyRouterOnlyCompat()
}
if (options.framework.id === 'solid') {
delete packageJSON.dependencies?.['`@tanstack/solid-start`']
delete packageJSON.dependencies?.['`@tanstack/solid-router-ssr-query`']
- const routerPluginVersion = ...
- ...
delete packageJSON.scripts?.start
+ applyRouterOnlyCompat()
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/create/src/package-json.ts` around lines 136 - 169, The react and
solid branches in packageJSON handling duplicate the same router plugin/core
migration logic, so extract that shared work into a helper and call it from both
branches. Move the routerPluginVersion lookup, deletion of
`@tanstack/router-plugin` from dependencies, promotion into devDependencies, and
ensuring `@tanstack/router-core` stays in dependencies into a reusable function
referenced by the package-json.ts flow, keeping the framework-specific deletions
separate.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/create/src/package-json.ts`:
- Around line 136-169: The react and solid branches in packageJSON handling
duplicate the same router plugin/core migration logic, so extract that shared
work into a helper and call it from both branches. Move the routerPluginVersion
lookup, deletion of `@tanstack/router-plugin` from dependencies, promotion into
devDependencies, and ensuring `@tanstack/router-core` stays in dependencies into a
reusable function referenced by the package-json.ts flow, keeping the
framework-specific deletions separate.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 263d423e-4d0c-4892-8d38-7bdb65521bd6
📥 Commits
Reviewing files that changed from the base of the PR and between 12c31df and 7a95b6a.
📒 Files selected for processing (5)
.changeset/tidy-spoons-dream.md
packages/create/src/frameworks/react/project/packages.json
packages/create/src/frameworks/solid/project/packages.json
packages/create/src/package-json.ts
packages/create/tests/package-json.test.ts
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The generated apps now declare the router core peer whenever their router devtools are included. Thanks for the repro.
AI review notes:
Using the repro’s Yarn 4.17.0, fresh apps generated by released CLI 0.72.16 showed the missing peer in both frameworks and Solid failed its build on that import. The updated CLI generated React and Solid apps outside the monorepo with a single additional manifest entry each. Both installed, built and passed TypeScript checks. Yarn resolved the new direct entry to the router-core version already in each dependency graph. The normal full build and test hook also passed. Current main already places the router plugin solely in devDependencies in these generated projects.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|