darkroomengineering / lenis

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

Smooth is not defined #224

Closed SamCharpentier closed 10 months ago

SamCharpentier commented 10 months ago

I see this error on the console of my website:

Uncaught ReferenceError: smooth is not defined at new t (lenis.min.js:2:233)

What is weird is that it's only happening on the live domain, on the webflow subdomain there's no error. But it's using exactly the same code: https://www.skytree.eu/ https://skytree.webflow.io/

I see this error on some of my sites using Lenis but not all

Capture d’écran, le 2023-09-05 à 22 56 10

I use this Lenis version: https://cdn.jsdelivr.net/gh/studio-freight/lenis@1/bundled/lenis.min.js

bolk-studio commented 10 months ago

I can report the same issue on my website: https://decent-dao-2023-rd-before-transfer.webflow.io/

Capture d’écran 2023-09-06 à 09 05 52 Capture d’écran 2023-09-06 à 09 06 04

We also use this Lenis version: https://cdn.jsdelivr.net/gh/studio-freight/lenis@1/bundled/lenis.min.js

bolk-studio commented 10 months ago

On my end, using this file https://cdn.jsdelivr.net/gh/studio-freight/lenis@1.0.22/bundled/lenis.min.js instead of https://cdn.jsdelivr.net/gh/studio-freight/lenis@1/bundled/lenis.min.js fixed the problem.

clementroche commented 10 months ago

Just use https://cdn.jsdelivr.net/gh/studio-freight/lenis@1.0.22/bundled/lenis.min.js as @bolk-studio mentioned. I fixed the @1 anyway, it now redirects to @1.0.22 correctly