Peer dependency error with react-location-devtools #257
Send to my agentDescribe the bug#
Hello, I'm experiencing this behaviour while installing the latest packages (see below).
Not a real issue, it's just a little bit annoying to force on all npm install I do (it complains even when installing other packages at later times), but I just wanted to report this in case nobody was aware yet.
Thank you for the awesome library by the way!
Your Example Website or App#
N/A
Steps to Reproduce the Bug or Issue#
Package.json containing:
"@tanstack/react-location": "^3.7.4",
"@tanstack/react-location-devtools": "^3.4.4"
(I wasn't unable to find a devtool version matching the react-location one)
When I run npm install I'm getting these errors:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @tanstack/react-location-devtools@3.4.4
npm ERR! Found: @tanstack/react-location@3.7.4
npm ERR! node_modules/@tanstack/react-location
npm ERR! @tanstack/react-location@"^3.7.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @tanstack/react-location@"3.4.4" from @tanstack/react-location-devtools@3.4.4
npm ERR! node_modules/@tanstack/react-location-devtools
npm ERR! dev @tanstack/react-location-devtools@"^3.4.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @tanstack/react-location@3.4.4
npm ERR! node_modules/@tanstack/react-location
npm ERR! peer @tanstack/react-location@"3.4.4" from @tanstack/react-location-devtools@3.4.4
npm ERR! node_modules/@tanstack/react-location-devtools
npm ERR! dev @tanstack/react-location-devtools@"^3.4.4" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
If I run the command with the -f (force) switch, errors turn into warnings, the installation succeeds and I can see the devtools running in the app.
Expected behavior#
Installation shouldn't give errors and proceed without the need to force it.
Screenshots or Videos#
No response
Platform#
- OS: Linux
- Browser: N/A
- Version: N/A
- NodeJS: 16.14.2
- npm: 8.6.0
Additional context#
No response
Or with pnpm, you can use allowedversions:
"pnpm": { "peerDependencyRules": { "allowedVersions": { "@tanstack/react-location": "3.7.4" } } }tannerlinsley closed this
Sign in to join this conversation.
You can use npm 7 overrides:
In addition to this, the docs are really confusing, as they state:
No need to install anything extra, just: import { ReactLocationDevtools } from '@tanstack/react-location-devtools'which doesn't appear to be the case. This is not a great DX when trying to use this library for this first time.