imagekit-developer/imagekit-react

NOT WORKING IN REACT18

hmehta051 opened this issue · 2 comments

I AM TRYING INSTALLING IMAGEKIT USING NPM AND IT IS GIVING ERROR LIKE THIS
`npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: driveu_frontend@0.1.0
npm ERR! Found: react@18.1.0
npm ERR! node_modules/react
npm ERR! react@"^18.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.13.1 || ^17.0.0" from imagekitio-react@1.1.0
npm ERR! node_modules/imagekitio-react
npm ERR! imagekitio-react@"*" 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/apple/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/apple/.npm/_logs/2022-06-03T09_40_57_247Z-debug-0.log
`
CURRENTLY I AM USING REACT18 FOR DEVELOPMENT

ahnv commented

Hey @hmehta051

To use this package in React 17, you can use --legacy-peer-deps flag while running npm install as mentioned in the npm error.

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.

thanks,it's worked