Fulcrum Posted February 20, 2024 Posted February 20, 2024 Hi, Receiving this "Module not found" error while importing DrawSVGPlugin module. the base gsap is working fine, just the drawSVGPlugin is throwing this error. import { DrawSVGPlugin } from 'gsap/DrawSVGPlugin'; export const PathAnimation = () => { gsap.registerPlugin(DrawSVGPlugin); } I am using NextJS 14.1.0. I tried importing the plugin from "/dist" "/all", but the issue persists. Thanks in advance for help.
mvaneijgen Posted February 20, 2024 Posted February 20, 2024 Hi @Fulcrum welcome to the forum! The DrawSVG plugin is available for our Club GSAP Plus members. It is a payed plugin. If you just want to test them out you can use all the bonus plugins to your heart's content on Codepen or Stackblitz, you can even test the plugins locally if you install the trial package https://gsap.com/resources/trial Hope it helps and happy tweening!
Rodrigo Posted February 20, 2024 Posted February 20, 2024 Hi, Also is worth noticing that when using SSR like Next is better to use the UMD Modules instead of the ES Modules: import gsap from "gsap-trial"; import { DrawSVGPlugin } from "gsap-trial/dist/DrawSVGPlugin"; // Register the plugin only on the client side if (typeof window !== "undefined") gsap.registerPlugin(DrawSVGPlugin); Hopefully this helps. Happy Tweening!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now