Describe the bug
Using the version 3 of this library with TypeScript and WebPack, the console throws the following error:
ERROR TypeError: animejs__WEBPACK_IMPORTED_MODULE_1__ is not a function
I'm not exactly sure if the problem comes from the new version of this library, or if the type definition are outdated (@types/animejs).
To Reproduce
Steps to reproduce the behavior:
ng new myProject@types/animejs) using npmimport * as anime from 'animejs';)Expected behavior
See animation without error.
Desktop (please complete the following information):
I am seeing the same exact error....haven't been able to solve this.
I was able to get rid of the error with Angular 7 by rolling anime.js back to version 2.2.0.
@christopher-harris indeed, that's why I said
I'm not exactly sure if the problem comes from the new version of this library, or if the type definition are outdated (@types/animejs).
I had this issue too, to fix its I had to use the following import: import anime from 'animejs/lib/anime.es';
npm i animejs
npm i @types/animejs
import anime from 'animejs/lib/anime.es';
use directly anime, work fine on angular 7 @ashhitch +1
Worked for me too ! +1 @ashhitch 馃槃
Thanks,
import anime from 'animejs/lib/anime.es';
works for me too.
Fixed! Thanks
Most helpful comment
I had this issue too, to fix its I had to use the following import:
import anime from 'animejs/lib/anime.es';