Hi everyone,
I want to use GSAP in my project with NextJS + Typescript. However, I am getting the error you will see in the screenshot.
My code to import the library;
import gsap from 'gsap';
import { ScrollTrigger } from 'gsap/ScrollTrigger';
gsap.registerPlugin(ScrollTrigger);
or
import gsap from 'gsap';
import { ScrollTrigger } from 'gsap/dist/ScrollTrigger';
gsap.registerPlugin(ScrollTrigger);
Error;
Version information;
"gsap": "^3.2.6"
"next": "^10.2.0"
"typescript": "^4.2.4"
I tried all the methods mentioned in the forums but could not fix this error
When I try with NextJS without Typescript, I get the same error.
Thanks