Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peer dependencies in version 2.2.1 #276

Open
duncannz opened this issue Sep 27, 2023 · 2 comments
Open

Peer dependencies in version 2.2.1 #276

duncannz opened this issue Sep 27, 2023 · 2 comments

Comments

@duncannz
Copy link

Version 2.2.1 adds a peer dependency on @reach/router: #261

However, @reach/router itself has not been updated in over 3 years, and has a peer dependency on "react": "15.x || 16.x || 16.4.0-alpha.0911da3" - i.e. it is not even compatible with React 17, let alone 18.

This causes errors running npm install for anyone trying to use React 17 or 18 with use-query-params version 2.2.1.

In my opinion, @reach/router which is clearly no longer an active project should not be added as a peer dependency, and it would possibly make sense to drop support altogether.

An example of the error that now occurs when running npm install:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @vxt/web@0.0.0-changedDuringDockerBuild
npm ERR! Found: use-query-params@undefined
npm ERR! packages/web/node_modules/use-query-params
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! use-query-params@"^2.2.0" from @vxt/web@0.0.0-changedDuringDockerBuild
npm ERR! packages/web
npm ERR!   @vxt/web@0.0.0-changedDuringDockerBuild
npm ERR!   node_modules/@vxt/web
npm ERR!     workspace packages/web from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@16.14.0
npm ERR! node_modules/react
npm ERR!   peer react@"15.x || 16.x || 16.4.0-alpha.0911da3" from @reach/router@1.3.4
npm ERR!   node_modules/@reach/router
npm ERR!     peerOptional @reach/router@"^1.2.1" from use-query-params@2.2.1
npm ERR!     node_modules/use-query-params
npm ERR!       use-query-params@"^2.2.0" from @vxt/web@0.0.0-changedDuringDockerBuild
npm ERR!       packages/web
npm ERR!         @vxt/web@0.0.0-changedDuringDockerBuild
npm ERR!         node_modules/@vxt/web
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.
@MichaelHefetz
Copy link

We have the same issue. I use it with React 18. Just installed with --force flag. But, proper solution will be great. Thanks.

@luigimannoni
Copy link

Bump.
Been using use-query-params just fine until like yesterday, but started to break lately as another package requires 2.2.1 :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants