GSAP ScrollTrigger with Next.js

I’m trying to use ScrollTrigger with Next.js:

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


I got this error: enter image description here

Does anyone have a solution for this problem?

83 thoughts on “GSAP ScrollTrigger with Next.js”

  1. Hey there I am so grateful I found your site, I really
    found you by error, while I was researching on Bing for something else, Regardless I am here now and would just
    like to say thank you for a fantastic post and a all round enjoyable blog (I also love the theme/design),
    I don’t have time to go through it all at the minute
    but I have saved it and also added in your RSS feeds, so when I have time I will be back
    to read a lot more, Please do keep up the excellent b.


Leave a Comment