kevinsqi / react-circular-progressbar

A circular progressbar component, built with SVG and extensively customizable
http://www.kevinqi.com/react-circular-progressbar
MIT License
1.09k stars 132 forks source link

Upgrade to React 18? #208

Closed garcikg0 closed 2 years ago

garcikg0 commented 2 years ago

🐛 Bug report

Summary of issue

Unable to resolve dependency tree when trying to install using "npm i react-circular-progressbar" command in terminal.

Reproducible example

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: pomodor-timer-frontend@0.1.0 npm ERR! Found: react@18.0.0 npm ERR! node_modules/react npm ERR! react@"^18.0.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-circular-progressbar@2.0.4 npm ERR! node_modules/react-circular-progressbar npm ERR! react-circular-progressbar@"*" 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.

Your environment

altanaldeniz commented 2 years ago

You can try the command: npm install react-circular-progressbar --force until the library gets fixed.

rhazegh commented 2 years ago

Since React 18 is backwards compatible with 17, do we only need to edit package.json and make the following changes?

"version": "2.0.5",
  "peerDependencies": {
    "react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"
  }
ngothiensinh commented 2 years ago

There's a PR active. Try the command: npm i --save kevinsqi/react-circular-progressbar#pull/209/head until it gets merged

kevinsqi commented 2 years ago

Sorry for the delay here; this should be fixed in 2.1.0 with https://github.com/kevinsqi/react-circular-progressbar/pull/209. Let me know if there are other issues here.