plus1tv / react-anime

✨ (ノ´ヮ´)ノ*:・゚✧ A super easy animation library for React!
https://codepen.io/collection/nrkjgo/
MIT License
1.55k stars 81 forks source link

Breaks immediately with Next.Js #69

Closed 2manypistachios closed 4 years ago

2manypistachios commented 4 years ago

I haven't been able to use the package at all, starting from a default Next project, using npx create-next-app

Depending on: "dependencies": { "animejs": "^3.1.0", "next": "9.1.6", "react": "16.12.0", "react-anime": "^2.3.2", "react-dom": "16.12.0" }

I tried to run tests with and without animejs, both failing.

Getting errors in the browser saying: `Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

Please update the following components: e dll_d6a88dbe3071bd165157.js:12608:15 The above error occurred in the component: in e (at pages/index.js:6) in div (at pages/index.js:5) in Home (created by App) in App in Container (created by AppContainer) in AppContainer

React will try to recreate this component tree from scratch using the error boundary you provided, App. index.js:1 The above error occurred in the component: in App in Container (created by AppContainer) in AppContainer

React will try to recreate this component tree from scratch using the error boundary you provided, Container. index.js:1 TypeError: y.remove is not a function 2 react-anime.js:1 Source map error: Error: Invalid URL: webpack://[name]_[chunkhash]/webpack/bootstrap Resource URL: http://localhost:3000/_next/static/development/dll/dll_d6a88dbe3071bd165157.js?ts=1577834418975 Source Map URL: dll_d6a88dbe3071bd165157.js.map`

The page temporarily loads and then glitches out.

alaingalvan commented 4 years ago

Thanks for the heads up, I'm seeing those warnings on my end when running these tests, working on a patch now.

I'll edit this reply once it's ready. 👨‍🍳

EDIT: Things should be fine now, both in our unit tests and when using the library. I'm going to call this one done for now and close the issue, but I'll be happy to re-open it if anything else shows up. 👍