Skip to content

Conversation

@SeoJaeWan
Copy link

@SeoJaeWan SeoJaeWan commented Jan 13, 2026

fixes #6347

In Yarn 4 with pnpm linker, the peer dependencies from router-ssr-query-core (@tanstack/router-core, @tanstack/query-core) are not properly resolved, causing esbuild errors during Vite's dependency optimization.

This PR adds @tanstack/router-core as an explicit peer dependency to the ssr-query framework packages, following the same pattern used in react-router-devtools.

Changes

  • packages/react-router-ssr-query/package.json - add @tanstack/router-core peer dependency
  • packages/solid-router-ssr-query/package.json - add @tanstack/router-core peer dependency
  • packages/vue-router-ssr-query/package.json - add @tanstack/router-core peer dependency

Testing

Verified using the reproduction repo from the issue: https://github.com/AlexanderOpran/my-app

Before: Could not resolve "@tanstack/router-core" error on yarn dev
After: Vite dev server starts successfully


cc @tannerlinsley @schiller-manuel - Would appreciate a review when you have a chance. Thanks!

Summary by CodeRabbit

  • Chores
    • Updated peer dependency requirements: "@tanstack/router-core" (>=1.127.0) is now required across React, Solid, and Vue router packages.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 13, 2026

📝 Walkthrough

Walkthrough

Three framework-specific SSR query wrapper packages had their package manifests updated to add @tanstack/router-core (>=1.127.0) as a peer dependency; no runtime logic or exports were changed.

Changes

Cohort / File(s) Summary
Add @tanstack/router-core peer dependency
packages/react-router-ssr-query/package.json, packages/solid-router-ssr-query/package.json, packages/vue-router-ssr-query/package.json
Added "@tanstack/router-core": ">=1.127.0" to peerDependencies in each package.json (single-line manifest updates).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Suggested labels

package: router-core, package: react-router, package: solid-router

Suggested reviewers

  • schiller-manuel

Poem

🐇 I nibbled a manifest, small and neat,

Three packages now share a common beat,
Router-core snug as a seed in the ground,
Strict installers cheer at the sound,
I hop off, pleased — dependency found! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately describes the main change: adding missing @tanstack/router-core peer dependencies to three ssr-query packages to fix dependency resolution issues.
Linked Issues check ✅ Passed The PR successfully addresses the primary objective from issue #6347 by adding @tanstack/router-core as a peer dependency to all three framework-specific ssr-query packages, matching the existing pattern.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the peer dependency resolution issue; no unrelated modifications were introduced beyond the stated objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@AlexanderOpran
Copy link

Hey,
First of all, thank you for tackling the issue I reported!

I'm not that familiar with tanstack but since router-ssr-query-core directly imports from router-core and query-core, shouldn't these be direct dependencies for router-ssr-query-core (not devDependencies and peerDependencies)? Unless we want to make sure it's getting router-core as provided by react-router and we propagate the peerDependencies as in your PR.

I would also suggest tackling the other peerDependencies resolution issues in this same PR.

WARN  Issues with peer dependencies found
├─┬ @tanstack/react-devtools 0.7.0
│ └─┬ @tanstack/devtools 0.6.14
│   └─┬ goober 2.1.18
│     └── ✕ missing peer csstype@^3.0.10
├─┬ @tanstack/react-router-devtools 1.132.0
│ └─┬ @tanstack/router-devtools-core 1.132.0
│   ├── ✕ missing peer csstype@^3.0.10
│   ├── ✕ missing peer tiny-invariant@^1.3.3
│   └── ✕ missing peer @tanstack/router-core@^1.132.0
├─┬ @tanstack/react-router-ssr-query 1.131.7
│ ├── ✕ missing peer @tanstack/query-core@>=5.66.0
│ ├── ✕ missing peer @tanstack/react-query@>=5.66.2
│ └─┬ @tanstack/router-ssr-query-core 1.131.7
│   ├── ✕ missing peer @tanstack/router-core@>=1.127.0
│   └── ✕ missing peer @tanstack/query-core@>=5.66.0
├─┬ vite 7.1.7
│ └── ✕ unmet peer @types/node@"^20.19.0 || >=22.12.0": found 22.10.2
└─┬ @tailwindcss/vite 4.0.6
  └── ✕ unmet peer vite@"^5.2.0 || ^6": found 7.1.7
Peer dependencies that should be installed:
  @tanstack/query-core@>=5.66.0             csstype@">=3.0.10 <4.0.0-0"
  @tanstack/react-query@>=5.66.2            tiny-invariant@^1.3.3
  @tanstack/router-core@">=1.132.0 <2.0.0"
// packages/react-router-devtools/package.json
"peerDependencies": {
  "csstype": "^3.0.10",
  "tiny-invariant": "^1.3.3",
  "@tanstack/router-core": "^1.132.0",
  // ... existing peer deps
}

// packages/devtools/package.json
"peerDependencies": {
  "csstype": "^3.0.10",
  // ... existing peer deps
}

@SeoJaeWan
Copy link
Author

SeoJaeWan commented Jan 14, 2026

Thanks for the feedback!

Question 1: Using peerDependencies is consistent with the existing pattern in react-router-devtools, which also declares @tanstack/router-core as a peer dependency rather than a direct dependency.

Question 2: The csstype/tiny-invariant warnings don't block app execution (unlike the ERROR in #6347), and they might be intentional design choices. I'd prefer to leave that decision to the maintainers.

@nx-cloud
Copy link

nx-cloud bot commented Jan 15, 2026

View your CI Pipeline Execution ↗ for commit 9643b7f


☁️ Nx Cloud last updated this comment at 2026-01-15 06:51:18 UTC

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@packages/solid-router-ssr-query/package.json`:
- Around line 76-79: Update the peerDependencies entry for the internal monorepo
package by replacing the version constraint for "@tanstack/router-core" with the
workspace protocol; locate the peerDependencies object in package.json (the
entry for "@tanstack/router-core") and change its value to "workspace:*" so it
matches other internal packages like `@tanstack/solid-router-devtools`.

In `@packages/vue-router-ssr-query/package.json`:
- Around line 70-73: Update the peerDependencies entry for the internal monorepo
package by replacing the version specifier for "@tanstack/router-core" with the
workspace protocol; edit the package.json peerDependencies block where
"@tanstack/router-core" is listed and change its value to "workspace:*" so the
package uses the monorepo workspace link instead of a hard version string.
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9643b7f and dcc60fc.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • packages/react-router-ssr-query/package.json
  • packages/solid-router-ssr-query/package.json
  • packages/vue-router-ssr-query/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/react-router-ssr-query/package.json
🧰 Additional context used
📓 Path-based instructions (1)
**/package.json

📄 CodeRabbit inference engine (AGENTS.md)

Use workspace protocol workspace:* for internal dependencies in package.json files

Files:

  • packages/solid-router-ssr-query/package.json
  • packages/vue-router-ssr-query/package.json

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines 76 to 79
"peerDependencies": {
"@tanstack/query-core": ">=5.90.0",
"@tanstack/router-core": ">=1.127.0",
"@tanstack/solid-query": ">=5.90.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Find the location of `@tanstack/router-core` package
find . -type f -name "package.json" -path "*/router-core/*" | head -5

Repository: TanStack/router

Length of output: 94


🏁 Script executed:

# Check the file in question and its full content
cat packages/solid-router-ssr-query/package.json

Repository: TanStack/router

Length of output: 2472


🏁 Script executed:

# Search for how other packages define peerDependencies with internal packages
rg -A 3 '"peerDependencies"' --type json | head -100

Repository: TanStack/router

Length of output: 5238


Use workspace:* for internal peer dependencies.

@tanstack/router-core is an internal monorepo package and should use the workspace protocol. This aligns with the workspace protocol requirement for package.json entries and matches the pattern used in similar packages like @tanstack/solid-router-devtools and @tanstack/vue-router-devtools.

🔧 Suggested change
-    "@tanstack/router-core": ">=1.127.0",
+    "@tanstack/router-core": "workspace:*",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"peerDependencies": {
"@tanstack/query-core": ">=5.90.0",
"@tanstack/router-core": ">=1.127.0",
"@tanstack/solid-query": ">=5.90.0",
"peerDependencies": {
"@tanstack/query-core": ">=5.90.0",
"@tanstack/router-core": "workspace:*",
"@tanstack/solid-query": ">=5.90.0",
🤖 Prompt for AI Agents
In `@packages/solid-router-ssr-query/package.json` around lines 76 - 79, Update
the peerDependencies entry for the internal monorepo package by replacing the
version constraint for "@tanstack/router-core" with the workspace protocol;
locate the peerDependencies object in package.json (the entry for
"@tanstack/router-core") and change its value to "workspace:*" so it matches
other internal packages like `@tanstack/solid-router-devtools`.

Comment on lines 70 to 73
"peerDependencies": {
"@tanstack/query-core": ">=5.90.0",
"@tanstack/router-core": ">=1.127.0",
"@tanstack/vue-query": ">=5.90.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, find the package.json file and see its context
find . -name "package.json" -type f | head -20

Repository: TanStack/router

Length of output: 1158


🏁 Script executed:

# Check the specific file mentioned in the review
cat packages/vue-router-ssr-query/package.json | head -80

Repository: TanStack/router

Length of output: 2262


🏁 Script executed:

# Look for other package.json files in the packages directory to see how internal deps are handled
find packages -name "package.json" -type f | xargs grep -l "@tanstack/router-core" | head -10

Repository: TanStack/router

Length of output: 460


🏁 Script executed:

# Check if workspace:* is used for internal dependencies in other package.json files
rg '"@tanstack/[^"]+": "workspace:\*' packages --type json

Repository: TanStack/router

Length of output: 7838


🏁 Script executed:

# Search for workspace:* in peerDependencies sections
rg -A 20 '"peerDependencies"' packages --type json | grep -E '(peerDependencies|workspace:\*|@tanstack)'

Repository: TanStack/router

Length of output: 5257


🏁 Script executed:

# Check specific examples of internal packages' peerDependencies to see the pattern
cat packages/react-router-ssr-query/package.json | grep -A 10 '"peerDependencies"'

Repository: TanStack/router

Length of output: 331


🏁 Script executed:

# Check vue-router's peerDependencies as well
cat packages/vue-router/package.json | grep -A 10 '"peerDependencies"'

Repository: TanStack/router

Length of output: 108


🏁 Script executed:

# Check the most similar packages to vue-router-ssr-query (other devtools packages)
echo "=== Vue Router Devtools peerDependencies ===" && \
cat packages/vue-router-devtools/package.json | grep -A 5 '"peerDependencies"'

echo "=== React Router Devtools peerDependencies ===" && \
cat packages/react-router-devtools/package.json | grep -A 5 '"peerDependencies"'

echo "=== Router Devtools Core peerDependencies ===" && \
cat packages/router-devtools-core/package.json | grep -A 5 '"peerDependencies"'

Repository: TanStack/router

Length of output: 699


🏁 Script executed:

# Check if there's a pattern: when was workspace:^ introduced vs version constraints
# Look at start-static-server-functions which uses workspace:* in peerDependencies
cat packages/start-static-server-functions/package.json | grep -A 10 '"peerDependencies"'

Repository: TanStack/router

Length of output: 323


🏁 Script executed:

# Check if there's a distinction between how workspace:* vs workspace:^ is used
# across different types of internal packages
rg '"workspace:\^"' packages --type json | head -20

Repository: TanStack/router

Length of output: 913


🏁 Script executed:

# See if there's any documentation or pattern in the repo about this choice
find . -name "CONTRIBUTING*" -o -name "README*" | xargs grep -l "workspace" 2>/dev/null | head -5

Repository: TanStack/router

Length of output: 76


🏁 Script executed:

# Check CONTRIBUTING.md for workspace protocol guidance
cat CONTRIBUTING.md | grep -A 5 -B 5 "workspace"

Repository: TanStack/router

Length of output: 634


Use workspace:* for the internal peer dependency.

@tanstack/router-core is an internal monorepo package and should use the workspace protocol to maintain consistency with the codebase standards and enable proper local linking.

🔧 Suggested change
-    "@tanstack/router-core": ">=1.127.0",
+    "@tanstack/router-core": "workspace:*",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"peerDependencies": {
"@tanstack/query-core": ">=5.90.0",
"@tanstack/router-core": ">=1.127.0",
"@tanstack/vue-query": ">=5.90.0",
"peerDependencies": {
"@tanstack/query-core": ">=5.90.0",
"@tanstack/router-core": "workspace:*",
"@tanstack/vue-query": ">=5.90.0",
🤖 Prompt for AI Agents
In `@packages/vue-router-ssr-query/package.json` around lines 70 - 73, Update the
peerDependencies entry for the internal monorepo package by replacing the
version specifier for "@tanstack/router-core" with the workspace protocol; edit
the package.json peerDependencies block where "@tanstack/router-core" is listed
and change its value to "workspace:*" so the package uses the monorepo workspace
link instead of a hard version string.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

some peer dependencies (@tanstack/query-core, @tanstack/router-core) are unresolvable with strict package managers

2 participants