Please provide the following:
- SDK Version: latest expo cli, on windows
- Platforms(Android/iOS/web/all): all
- Add the appropriate “Tag” based on what Expo library you have a question on. Image
While installing (npm i react-lazy-load-image-component) I am getting “unable to resolve dependency tree” error
My Code
import { LazyloadImage } from ‘react-lazy-load-image-component’;
export default function Mymage(){
console.log(“MyImage”);
return (
<LazyloadImage
effect=“blur”
style={styles.avatarImage}
src={"https://images.unsplash.com/photo-1633205719979-e47958ff6d93?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=387&q=80"}
placeHolderSrc={process.env.PUBLIC_URL + “/mylogo.png”}
/>
);
}
Error
PS D:\hiveGit\poc\product-list> npm i react-lazy-load-image-component
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: product-list@1.0.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! peer react@“^15.x.x || ^16.x.x || ^17.x.x || ^18.x.x” from react-lazy-load-image-component@1.5.5
npm ERR! node_modules/react-lazy-load-image-component
npm ERR! react-lazy-load-image-component@“” from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@“17.0.2” from react-dom@17.0.2
npm ERR! node_modules/react-dom
npm ERR! react-dom@“17.0.2” from the root project
npm ERR! peer react-dom@“^15.x.x || ^16.x.x || ^17.x.x || ^18.x.x” from react-lazy-load-image-component@1.5.5
npm ERR! node_modules/react-lazy-load-image-component
npm ERR! react-lazy-load-image-component@“” 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.