【发布时间】:2021-12-14 13:22:24
【问题描述】:
当我尝试使用成帧器动作为 div 做简单的动画时。在浏览器中出现以下错误
/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs
Can't import the named export 'Children' from non EcmaScript module (only default export is available)```
【问题讨论】:
-
升级到最新版本的成帧器运动时面临同样的问题。这可能是与发布相关的错误。目前通过降级 framer-motion 版本解决了这个问题,直到下一个版本到来。只需在 package.json 中添加 "framer-motion": "^4.1.17" 并运行 npm install。
-
谢谢,成功了。
-
非常感谢...它成功了。!!! @Waleed Tariq
标签: reactjs motion framer-motion