auto-animate icon indicating copy to clipboard operation
auto-animate copied to clipboard

Not working in next.js

Open adammo94 opened this issue 3 years ago • 4 comments

I tried with next 10, react 16.8, node 16.13 and it gives me the following error

./node_modules/@formkit/auto-animate/react/index.mjs
Can't import the named export 'useEffect' from non EcmaScript module (only default export is available)

adammo94 avatar Jul 28 '22 13:07 adammo94

Can confirm the same issue in vanilla React 17.0.2

zbaker94 avatar Jul 28 '22 14:07 zbaker94

AutoAnimate is ESM only at the moment. can you provide a reproduction of the issue?

justin-schroeder avatar Jul 28 '22 15:07 justin-schroeder

I tried to reproduce with a code sandbox with zero issues. Looking around, it seems that it may be related to webpack configuration. My team is using CRA so I may be SOL.

Related StackOverflow: https://stackoverflow.com/questions/69343038/cant-import-the-named-export-xxxx-from-non-ecmascript-module-only-default-expo

zbaker94 avatar Jul 28 '22 15:07 zbaker94

@zbaker94 sorry for the late reply, yes I tried that one before you posted it and it solved the problem. We have some custom config, so this defo could be the culprit.

adammo94 avatar Jul 28 '22 22:07 adammo94