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

Add React 17 support #146

Closed
kj800x opened this issue Nov 18, 2020 · 5 comments
Closed

Add React 17 support #146

kj800x opened this issue Nov 18, 2020 · 5 comments

Comments

@kj800x
Copy link

kj800x commented Nov 18, 2020

According to the package.json, this package requires React ^16.0.0.

"peerDependencies": {
"react": "^16.0.0"
},

I attempted to add react-timeago to a project using React 17.0.1 and npm refused to install.

kevin@rayquaza:~/src/motor-control/ui$ npm install react-timeago
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! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0.0" from [email protected]
npm ERR! node_modules/react-timeago
npm ERR!   react-timeago@"*" 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 /home/kevin/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kevin/.npm/_logs/2020-11-18T07_15_05_268Z-debug.log

I am on the latest versions of node and npm

kevin@rayquaza:~/src/motor-control/ui$ node --version
v15.2.1
kevin@rayquaza:~/src/motor-control/ui$ npm --version
7.0.8
@caleb-harrelson
Copy link
Contributor

caleb-harrelson commented Nov 19, 2020

I am on the latest versions of node and npm

That's the reason it breaks entirely as npm 7 has changed how peer dependencies are resolved. This package should add explicit support for v17, but failing that you might want to keep an eye on the ability to override peer dependency resolutions as first proposed here and the actual RFC here. Until then, you may want to look into using --legacy-peer-deps with npm.

@nmn
Copy link
Owner

nmn commented Nov 20, 2020

Ill update the package to add support for React 17.

@romiem
Copy link
Contributor

romiem commented Mar 3, 2021

PR here - please would you mind merging @nmn ? Thank you!

#152

@Willyham
Copy link

Works for me with npm i react-timeago --legacy-peer-deps for now.

@nmn
Copy link
Owner

nmn commented May 16, 2021

DONE.

@nmn nmn closed this as completed May 16, 2021
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

5 participants