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.
Package:
@cloudflare/tanstack-ai@0.1.6Affects: Any project using
@cloudflare/tanstack-aialongside@tanstack/ai@>=0.6.0Problem
@cloudflare/tanstack-aideclares:Under npm's semver rules for
0.xpackages,^0.5.0resolves to>=0.5.0 <0.6.0. Projects using@tanstack/ai@0.8.x(the current stable release) hit anERESOLVEpeer dependency conflict when runningnpm updateor a freshnpm install:Root cause
The
package.jsonin this repo already uses@tanstack/ai@^0.8.1indevDependencies, confirming the package is built and tested against 0.8.x — thepeerDependenciesrange was simply never updated to match.Why the usual workarounds don't fully solve this
npm
overridescan redirect which version of a package gets installed, but they cannot suppress peer dependency range-checkERESOLVEerrors duringnpm 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=trueto.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
peerDependenciesinpackages/tanstack-ai/package.json:"peerDependencies": { - "@tanstack/ai": "^0.5.0" + "@tanstack/ai": "^0.8.0" }A PR with this one-line fix is attached.