Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to run it server-side #889

Open
yuripourre opened this issue Apr 27, 2024 · 0 comments
Open

Ability to run it server-side #889

yuripourre opened this issue Apr 27, 2024 · 0 comments

Comments

@yuripourre
Copy link

Is your feature request related to a problem? Please describe.
I am trying to create some server-side animations using anime.js. I believe it can be done since I can define targets using JSON like the example: https://animejs.com/documentation/#JSobject

The problem is: if I define the target as object, the project throws this error:

 ReferenceError: NodeList is not defined
    at toArray (webpack-internal:///(rsc)/./node_modules/animejs/lib/anime.es.js:323:20)
    at parseTargets (webpack-internal:///(rsc)/./node_modules/animejs/lib/anime.es.js:646:87)
    at getAnimatables (webpack-internal:///(rsc)/./node_modules/animejs/lib/anime.es.js:651:16)
    at createNewInstance (webpack-internal:///(rsc)/./node_modules/animejs/lib/anime.es.js:847:21)
    at anime (webpack-internal:///(rsc)/./node_modules/animejs/lib/anime.es.js:935:18)
    ...

Describe the solution you'd like
It would be great if I could run anime.js server-side, I really enjoyed using the library and would like to use it.

Describe alternatives you've considered
I tried to declare a dummy NodeList class but the project still breaks.

Additional context
I am using next.js and typescript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant