Jump to content
Search Community
Fulcrum test
Moderator Tag

Recommended Posts

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);
}

image.thumb.png.7c4961eef4ea6c7983fd5449b2f919e8.png


I am using NextJS 14.1.0.
I tried importing the plugin from "/dist" "/all", but the issue persists.
Thanks in advance for help.

Link to comment
Share on other sites

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! 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...