b.a*_*ian 5 javascript babeljs react-native react-native-router-flux react-native-reanimated
我想使用react-native-router-flux,所以我按照其文档中的描述添加了它的依赖项。我还添加了 babel 插件依赖项,如下react-native-reanimated所示babel.config.js:
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
小智 2
不幸的是,expo sdk v38 还不支持 reanimated v2,因为“reanimated 2 目前仅\n支持 Hermes”。
\n这个问题也记录在react-native-reanimated v2文档中:“expo支持尚未准备好,下一个sdk版本将支持react native 0.62 \xe2\x80\x93,这将允许您在弹出的expo应用程序中使用reanimated 2 ”。
\n目前唯一的解决方案是弹出您的 expo 应用程序以便使用 reanimated ,或者寻找替代方案,例如react-native-animatable。
\nhttps://github.com/software-mansion/react-native-reanimated/issues/886
\n