Jump to content
Search Community

Nuxt.js Draggable error: cache.renderTransform is not a function

ThinkingAbout_dev test
Moderator Tag

Recommended Posts

Hi, I updated my nuxt.js project with the latest Club GreenSock (gsap-bonus.tgz) but I have the following error with Draggable:

 

Quote

webpack-internal:///./.nuxt/client.js:160 TypeError: cache.renderTransform is not a function
at _forceNonZeroScale (webpack-internal:///./node_modules/gsap/utils/matrix.js:72)
at getGlobalMatrix (webpack-internal:///./node_modules/gsap/utils/matrix.js:365)
at _getElementBounds (webpack-internal:///./node_modules/gsap/Draggable.js:425)
at _getBounds (webpack-internal:///./node_modules/gsap/Draggable.js:359)
at calculateBounds (webpack-internal:///./node_modules/gsap/Draggable.js:1385)
at Draggable._this2.applyBounds (webpack-internal:///./node_modules/gsap/Draggable.js:2317)
at recordStartPositions (webpack-internal:///./node_modules/gsap/Draggable.js:1569)
at Draggable._this2.enable (webpack-internal:///./node_modules/gsap/Draggable.js:2480)
at new Draggable (webpack-internal:///./node_modules/gsap/Draggable.js:2603)
at eval (webpack-internal:///./node_modules/gsap/Draggable.js:2620)

 

This is how I import the modules (universal mode):
 

import { gsap } from "gsap";
import { Draggable } from "gsap/Draggable";

if (process.client) {
  gsap.registerPlugin(Draggable);
}

In my nuxt.config.js I have:
 

  build: {
    transpile: ['gsap'] 
}


With the previous gsap-bonus.tgz version everything worked fine.
Can you please help me with this error?
Thank you :)
Matteo



 

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...