TweenMax gsap error Android and Simulator

Hi everyone. The application does not start in the simulator and android.
Version cocos creator 2.0.8 and 2.0.9-rc2
Version gsap 1.20.1
error immediately when starting the application, when importing gsap.

I use gsap

import { TweenLite, Bounce, Circ } from “gsap”;


Simulator: E/jswrapper (271): ERROR: Uncaught TypeError: container.appendChild is not a function, location: __node_modules/gsap/umd/TweenMax.js:0:0



Hey there,

We just had a similar issue, and I worked a bit of it out with the gsap team here:

The solution is to manually remove the CSSPlugin from the TweenMax file, the plugin is roughly 2000 lines. Fortunately both it and the plugin following have big block comments to make it easy to see where one starts and the other ends.

Unfortunately this makes it difficult if you’re working with gsap from an npm module. But you’re also able to just include TweenMax as part of your assets.

Hope this helps!

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.