Thanks for the response @ZachSaucier and @OSUblake. Here is what I'm getting:
Here is what I did:
Installed gsap via npm
Installed next-transpile-modules
Created a animation.js file that has this code:
import { gsap } from "gsap";
gsap.from (".studio" > "h2.section-title", {y:500, opacity:0, duration:1});
In the file I'm trying to animate elements, I imported the above animation.js file:
import '../scripts/animations.js';
The page loads without error but in terminal I get this:
GSAP target false not found. https://greensock.com
Invalid y tween of 500 Missing plugin? gsap.registerPlugin()
Invalid opacity tween of 0 Missing plugin? gsap.registerPlugin()
KJ