Republish the package with updated peerDependencies 'cause now we have a problem for React 17
See original GitHub issueHi! If you look at the current package.json
of this package published on NPM: https://unpkg.com/@use-it/event-listener@0.1.6/package.json
{
...
"peerDependencies": {
"react": "^16.8.0"
},
...
}
You will see that it only peer-depends on React ^16, whereas as React 17 is now released, it should be:
{
...
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0"
},
...
}
With the current package.json
, NPM returns the following error when I run npm update
:
$ npm update
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: bluelinks@5.0.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0" from @use-it/event-listener@0.1.6
npm ERR! node_modules/@use-it/event-listener
npm ERR! @use-it/event-listener@"^0.1.6" 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/antony/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/antony/.npm/_logs/2021-02-26T09_51_18_073Z-debug.log
Could you publish the updated package.json file, please? Thank you!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Support React 17 · Issue #1616 · bvaughn/react-virtualized
Currently, react-virtualized has a peer dependency on react and react-dom that constraints it to React 16. From my experiments, it already ...
Read more >How to fix NPM link duplicate dependencies issues
Dealing with dependencies when developing a package and using it through npm link.
Read more >How do I resolve peer dependency error: The package react ...
it worked when i updated npm "npm install npm -g" and then downgraded react to; "react": "15.3.0" , cleared cache: npm cache clear...
Read more >npm Peer Dependencies - JavaScript inDepth
Peer Dependencies are used to specify that our package is compatible with a specific version of an npm package. Good examples are Angular...
Read more >React 17 Compatibility - Material Design for Bootstrap
It kind of supports React 17. I asked a similar question here https://mdbootstrap.com/support/react/install-react-pro-5-0-1/. Using --legacy-peer-deps flag ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With NPM 7, working around this requires
npm install --force
.Perhaps it would make sense to just have a peer dependency of
>=16.8.0
? Then this issue will be fixed for the rest of time (until React breaks the package somehow 🙂 ).published x0.1.7