vutoan266 / react-images-uploading

The simple images uploader applied Render Props pattern that allows you to fully control UI component and behaviors.
https://github.com/vutoan266/react-images-uploading
MIT License
320 stars 52 forks source link

Upgrade react peerDependencies to React v17 #121

Closed franciscohanna92 closed 2 years ago

franciscohanna92 commented 2 years ago

I'm upgrading to node v16.14.2 / npm v8.50, and I'm getting an error saying:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @staff/admin-app@1.0.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from @staff/admin-app@1.0.0
npm ERR!   packages/admin-app
npm ERR!     @staff/admin-app@1.0.0
npm ERR!     node_modules/@staff/admin-app
npm ERR!       workspace packages\admin-app from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0" from react-images-uploading@3.1.3
npm ERR! node_modules/react-images-uploading
npm ERR!   react-images-uploading@"^3.1.2" from @staff/admin-app@1.0.0
npm ERR!   packages/admin-app
npm ERR!     @staff/admin-app@1.0.0
npm ERR!     node_modules/@staff/admin-app
npm ERR!       workspace packages\admin-app from the root project

I know there's a workaround to dismiss this error (not solving it), but this defeats one purpose of upgrading the npm.

The correct fix here would be to upgrade the perrDependencies of this project to react@17.x.x and react-dom@v17.x.x

Would you accept a PR for this?

vutoan266 commented 2 years ago

Hi @franciscohanna92 , I have just upgraded the peerDepedency of react/react-dom version. Please update to react-images-uploading@3.1.5 Thank you!