Jump to content


GSAP 3.10.3 not importing ScrollTrigger/ ScrollSmoother correctly?

Go to solution Solved by synthwavenomad,

Recommended Posts

Hey fellow Gsappers,

I am having an issue since the latest update. I am a club greensock member so I should be able to access the ScrollSmoother plugin.

I am importing in gsap, ScrollTrigger & ScrollSmoother but I am getting an error in the console and I am not sure why. I'm using a gulp workflow to compile but this hadn't been an issue until now. If I drop ScrollSmoother and do a test tween using ScrollTrigger everything works - so the issue definitely relates to ScrollSmoother?

Assuming others may also be having this issue - any help is much appreciated. ✌️




Link to comment
Share on other sites

Welcome to the forums @synthwavenomad


I can't reproduce that issue. I'm wondering if maybe your setup doesn't allow ES modules. Have you tried importing the UMD modules from the dist folder?


import { gsap } from "gsap/dist/gsap";
import { ScrollTrigger } from "gsap/dist/ScrollTrigger";
import { ScrollSmoother } from "gsap/dist/ScrollSmoother";


Link to comment
Share on other sites

Hi @OSUblake thank you for your response!

Unfortunately that has not changed anything, as mentioned it does work find if I don't use ScrollSmoother. For instance I could run a basic ScrollTrigger Timeline no issue but it is erroring because of importing in ScrollSmoother. I just keep getting the below error. Other plugins are working fine. 


Link to comment
Share on other sites

  • Solution

@OSUblake I have now solved this issue. Basically I was being a dumb dumb. I just noticed that my script was loading in the </head> instead of before </body>. I just didn't catch it sooner as my other code ran.

  • Like 2
Link to comment
Share on other sites

  • 4 months later...

Hi @Ifedyo, basically I was building on WordPress and I didn't enqueue the script in the footer. Are you using WordPress, if you could give me more information about your setup I will try and help. :)

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.