darkroomengineering / lenis

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

Uncaught ReferenceError: smooth is not defined #208

Closed balramxyadav closed 11 months ago

balramxyadav commented 11 months ago

Uncaught ReferenceError: smooth is not defined

Suddenly without doing anything, I am getting this error on my website.

I don't have any other code I just have the basic setup.

I tried to replicate it in Codepen and it gives the same error so I think it's an issue with the lib can anyone tell me how to fix it or if there is an older version that would work?

https://codepen.io/veuxon/pen/NWEzNGZ

arzafran commented 11 months ago

that codepen seems to work ok, no errors are logged in the console.

balramxyadav commented 11 months ago

Try to run it in a live view. The little external link button at the bottom it logs that error

balramxyadav commented 11 months ago

that codepen seems to work ok, no errors are logged in the console.

Hey, can you please help me with it?

Jman80 commented 11 months ago

This has happened to me too. "Uncaught ReferenceError: smooth is not defined". Was just working on this last night, everything was fine and woke up to this message....

jeanleroy64 commented 11 months ago

Same here "Uncaught ReferenceError: smooth is not defined". Was working fine until yesterday evening.

clementroche commented 11 months ago

the codepen you shared works without any error logged, please share it again with more context.

In the last Lenis version i removed legacy options (from v0) such as smooth, direction, gestureDirection and mouseMultiplier. If you used one of them, please refer to the documentation or stick lenis to @1.0.16 instead of @latest

swann19 commented 11 months ago

Hi! Same problem here! Everything was perfect last night and this morning "smooth is not defined".

I didn't change anything on my code.

If somebody has a tip, please share it :-)

jeanleroy64 commented 11 months ago

Hi! Same problem here! Everything was perfect last night and this morning "smooth is not defined".

I didn't change anything on my code.

If somebody has a tip, please share it :-)

Try switching back to lenis @1.0.16, it did the trick for me

clementroche commented 11 months ago

None of you is able to provide a codepen where the error appears ?

Jman80 commented 11 months ago

I guess we are all liars wasting our time coming here to let you know your plugin is not working. You have given access to the public domain to use this plugin the least you can do is take our word for it.

An update has clearly happened and broken code down our end, something which is terrible as we have cantered our design/code around this clearly temperamental plugin. I suggest we look for another alternative guys cuz I can see this happening again.

swann19 commented 11 months ago

None of you is able to provide a codepen where the error appears ?

Dont know if it can help, but there's a live exemple where the bug appears => here

Hope you can see something i didn't.

clementroche commented 11 months ago

@Jman80 thank you for your message, it's very kind from you. You selfish, you rely on OSS and it's fully free for everybody and you still complaining, you don't even imagine how webflow users are demanding on this library. If you want a special support just pay me and i'll be available asap to fix it. If not i'm spending my time on important tasks i have to do in my day.

I provided a fix like 3 hours ago, use "https://cdn.jsdelivr.net/gh/studio-freight/lenis@1.0.16/bundled/lenis.min.js" while i'm finding the solution. I mentioned couple of time that webflow users should stick lenis version while using it, otherwise it's gonna happen again and again.

swann19 commented 11 months ago

@clementroche Sorry Clément! I didn't wrote the right path to fix at 1.0.16!

Thanks for your tip and that very good pluggin!

clementroche commented 11 months ago

can you try with https://cdn.jsdelivr.net/gh/studio-freight/lenis@1.0.19/bundled/lenis.min.js @swann19

Jman80 commented 11 months ago

@clementroche I appreciate the fix you did 3hrs ago and I did see this , I just think you need to be a bit more polite and understand that we are not here to mess you about, we all came here for help. Cheers.

swann19 commented 11 months ago

https://cdn.jsdelivr.net/gh/studio-freight/lenis@1.0.19/bundled/lenis.min.js

@clementroche

Tested in local and web : That works!

Thanks!

clementroche commented 11 months ago

https://cdn.jsdelivr.net/gh/studio-freight/lenis@1/bundled/lenis.min.js has been fixed but you should always stick a version using Githubissues.

  • Githubissues is a development platform for aggregating issues.