Skip to content

fix(@cloudflare/tanstack-ai): peerDependency on @tanstack/ai is stale (^0.5.0 should be ^0.8.0) #463

@houmark

Description

@houmark

Package: @cloudflare/tanstack-ai@0.1.6
Affects: Any project using @cloudflare/tanstack-ai alongside @tanstack/ai@>=0.6.0

Problem

@cloudflare/tanstack-ai declares:

"peerDependencies": {
  "@tanstack/ai": "^0.5.0"
}

Under npm's semver rules for 0.x packages, ^0.5.0 resolves to >=0.5.0 <0.6.0. Projects using @tanstack/ai@0.8.x (the current stable release) hit an ERESOLVE peer dependency conflict when running npm update or a fresh npm install:

npm error ERESOLVE unable to resolve dependency tree
npm error Could not resolve dependency:
npm error peer @tanstack/ai@"^0.5.0" from @cloudflare/tanstack-ai@0.1.6
npm error Found: @tanstack/ai@0.8.1

Root cause

The package.json in this repo already uses @tanstack/ai@^0.8.1 in devDependencies, confirming the package is built and tested against 0.8.x — the peerDependencies range was simply never updated to match.

Why the usual workarounds don't fully solve this

npm overrides can redirect which version of a package gets installed, but they cannot suppress peer dependency range-check ERESOLVE errors during npm update. npm validates peer dep ranges at resolution time, before overrides take effect. See the npm overrides documentation and the related npm RFC — overrides explicitly do not affect peer dependency resolution.

The only available workaround is adding legacy-peer-deps=true to .npmrc, which restores pre-npm7 behavior that skips strict peer dep validation entirely. This is undesirable because it disables peer dep checks globally for the entire project — masking potentially legitimate conflicts from other packages.

Fix

Update peerDependencies in packages/tanstack-ai/package.json:

 "peerDependencies": {
-  "@tanstack/ai": "^0.5.0"
+  "@tanstack/ai": "^0.8.0"
 }

A PR with this one-line fix is attached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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