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

Support React v17 #870

Closed
ukalwa opened this issue Feb 19, 2021 · 1 comment · Fixed by #871
Closed

Support React v17 #870

ukalwa opened this issue Feb 19, 2021 · 1 comment · Fixed by #871

Comments

@ukalwa
Copy link
Contributor

ukalwa commented Feb 19, 2021

In a project I am working on which uses npm v7 (which automatically installs peer dependencies) and React 17, I am having trouble installing ahooks. Here is the error I get when I try to install it:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR!   peer react@"^16.8 || ^17.0" from @myproject/[email protected]
npm ERR!   node_modules/@myproject/use-auth
npm ERR!     @myproject/use-auth@"*" from the root project
npm ERR!   1 more (@myproject/use-request)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.6" from [email protected]
npm ERR! node_modules/ahooks
npm ERR!   peer ahooks@"^2.9" from @myproject/[email protected]
npm ERR!   node_modules/@myproject/use-auth
npm ERR!     @myproject/use-auth@"*" 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.
npm ERR! 
npm ERR! See /Users/workspace/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/workspace/.npm/_logs/2021-02-19T14_58_28_334Z-debug.log

Please support React v17. I am happy to help if someone can point me in the right direction.

@ukalwa
Copy link
Contributor Author

ukalwa commented Feb 19, 2021

In another project which uses npm v6 and React v17, I get a warning about peer dependency version mismatch but the use-request hook worked as expected. Hopefully this issue will probably involve just updating the React version in peerDependencies.

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

Successfully merging a pull request may close this issue.

1 participant