darkroomengineering/react-lenis

Can not install lenis scroll

nitras opened this issue · 5 comments

nitras commented

I run a nextjs project "next": "^12.3.1",

This is what happens when I try to install

npm i @studio-freight/react-lenis

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: datocms-demo-nextjs-i18n@1.0.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.2.0" from @studio-freight/react-lenis@0.0.25
npm ERR! node_modules/@studio-freight/react-lenis
npm ERR! @studio-freight/react-lenis@"*" 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.

can you try with any previous react-lenis version ?

Hahlh commented

Updating to React ^18 should do the trick if your other dependencies allow for it.

maybe I should downgrade minimal react version to ^16 in the package.json ?

any news @nitras ?

@nitras feel free to open a new issue if you're still facing the issue and we can evaluate a proper fix for old versions of react, for now we're not going to downgrade react to 16.