KarimMokhtar / react-drag-drop-files

Light and simple Reactjs drag and drop files library to use with very flexible options to change, so you put whatever the design you want for your drop-area. Users can drag and drop or even select the file anywhere in the window.
MIT License
245 stars 86 forks source link

Dependency Problem with React 18.0 #54

Closed marlonschlosshauer closed 2 years ago

marlonschlosshauer commented 2 years ago

Hi, I just tried to play around with this package but was met with a dependency error on install. I'm using React 18 and react-drag-drop-files is on 17.0.2. I'm guessing bumping the version would fix this.

Shell output:

react$ npx create-react-app
....
react$ cd test1/
test1$ npm i react-drag-drop-files
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: test1@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@"^17.0.2" from react-drag-drop-files@2.3.4
npm ERR! node_modules/react-drag-drop-files
npm ERR!   react-drag-drop-files@"*" 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/marlon/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/marlon/.npm/_logs/2022-03-29T16_20_10_035Z-debug-0.log
KarimMokhtar commented 2 years ago

Hi @marlonschlosshauer Thanks for your contribution Now solved with v.2.3.5