Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
vsiege

CustomEase not in dist directory after npm install

Recommended Posts

Hi GSAP community,

 

I attempting to use CustomEase and have followed the instructions in the docs for UMD/CommonJS with require. This is the exact install plugins I have opted to use. GSAP is currently working as desired (thanks!). The last plugin I added today was CustomEase and I am having trouble when I try to run my build. 

const { gsap } = require("gsap/dist/gsap");
const { ExpoScaleEase } = require("gsap/dist/EasePack");
const { CSSRulePlugin } = require("gsap/dist/CSSRulePlugin");
const { ScrollTrigger } = require("gsap/dist/ScrollTrigger");
const { CustomEase } = require("gsap/dist/CustomEase");

window.gsap = gsap;

gsap.registerPlugin(CSSRulePlugin, ScrollTrigger, CustomEase, ExpoScaleEase);

Before adding CustomEase, things were running well. Reviewing the debug (from Gulp task) I found that it cannot locate the module.

Error: Can't walk dependency graph: Cannot find module 'gsap/dist/CustomEase' from...

I then reviewed node_modules/gsap/dist for the CustomEase.ts file and it is absent. Perhaps I missed something in the installation instructions or I have to manually add it. Your help is appreciated. Thanks

 

From my package.json

...
"dependencies": {
    "gsap": "^3.6.1"
  }
...

 

Link to comment
Share on other sites

Posted (edited)

I located this thread which seems to indicate that I should download it manually. If that's still a valid answer, should I locate it manually in node_modules/gsap/dist  or is it better to leave that node directory alone and put it in another project directory? Thanks

Edited by vsiege
updated URL
Link to comment
Share on other sites

You're welcome to manually drop it into that directory if you prefer, but I personally think it's easier to just get the gsap-bonus.tgz file, put it in your project directory, and then just:

npm install ./gsap-bonus.tgz

Done. 👍

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Thank you Jack! I have located gsap-bonus.zip but not the *.tgz version. Could you point me in the right direction when you have a moment?

 

I'm going to watch this video as well 

 

Link to comment
Share on other sites

the video explains it all. Thanks again! 

  • Like 2
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.
×