lrvaka
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by lrvaka
-
-
Currently running NextJS 13.0.7 - trying to registerPlugin but I get the following error "ReferenceError: document is not defined". I have another project running 12.3.1 that allows me to registerPlugin. I've seen a few examples of registerPlugin being used in the forums on NextJS 13.0 so I'm unsure as to what is causing this problem exactly.
import { gsap } from "gsap";import { SplitText } from "gsap/dist/SplitText";export default function Home() {return (<><Head><title>Create Next App</title><meta name="description" content="Generated by create next app" /><meta name="viewport" content="width=device-width, initial-scale=1" /><link rel="icon" href="/favicon.ico" /></Head><Navbar /><main><Hero /><Projects /><AboutUs /><Services /><CTA /><WhyUs /></main><Footer /></>);}
NextJS - registerPlugin(...) leading to "ReferenceError: document is not defined"
in GSAP
Posted
Thanks for the response - however I see that the starter templates that are referenced have the gsap.registerPlugin() not inside of a lifecycle method, but how I have it in my example - it seems that latest version of NextJS 13.0.7 breaks this 🤷♂️