[英]index.js: Cannot find module 'react-native-reanimated/plugin'
[英]Cannot find module 'react-native-reanimated/plugin' from /projectFolder
我想使用react-native-router-flux
所以我添加了它的文档中描述的依赖项。 我还在babel.config.js
为react-native-reanimated
babel.config.js
添加了 babel 插件依赖,如下所示:
module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: ['react-native-reanimated/plugin'],};
但是现在我在地铁服务器中收到此错误:
错误:index.js:从“/home/nia/Downloads/YarAb”中找不到模块“react-native-reanimated/plugin”
我的本机版本是 0.63.2
不幸的是,expo sdk v38 还不支持 reanimated v2,因为“reanimated 2 目前只支持 hermes” 。
此问题也记录在 react-native-reanimated v2 文档中:“expo 支持尚未准备就绪,下一个 sdk 版本将支持 react native 0.62 – 这将允许您在弹出的 expo 应用程序中使用 reanimated 2。”
目前唯一的解决方案是退出您的 expo 应用程序以使用 reanimated,或者寻找替代方案,例如react-native-animatable 。
https://github.com/software-mansion/react-native-reanimated/issues/886
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.