darkroomengineering / lenis

How smooth scroll should be
https://lenis.darkroom.engineering
MIT License
7.35k stars 315 forks source link

yarn build failing in nextjs - react lenis #283

Closed a-somani closed 5 months ago

a-somani commented 5 months ago

I deleted my yarn lock and now after yarn install again, yarn build fails

To Reproduce create new nextjs project yarn add @studio-freight/react-lenis@0.0.28 yarn build

i tried upgrading to the latest version 0.0.43 but it does work either Screenshot 2024-01-11 at 1 57 01 PM

clementroche commented 5 months ago

Are you sure you're using 0.0.43 ?

Does this error also appear on dev ? or is it only happening on build ?

a-somani commented 5 months ago

yes, we tried with 0.0.43 yesterday and it still happened, it does not happen on dev, only on build. let me try again now

clementroche commented 5 months ago

It may be caused by tempus, can you try using v0.0.42 of @studio-freight/tempus ?

a-somani commented 5 months ago

i cant seem to reproduce it now with either version. it works. sorry for the trouble. ill let you know if it comes up again. it was something about some root needing to be at the end of the file

a-somani commented 5 months ago

hi i just had a colleague run into the issue, they are on node version 18 while im on v20.11.0. keeping this note in case anyone runs into the issue. the error message is default condition should be last one

clementroche commented 5 months ago

so what's the solution ? To use node v20 ?

a-somani commented 5 months ago

yes i think so