gpt4 book ai didi

javascript - 无法从/projectFolder 中找到模块 'react-native-reanimated/plugin'

转载 作者:行者123 更新时间:2023-12-04 08:57:54 27 4
gpt4 key购买 nike

我想用 react-native-router-flux所以我按照其文档中的描述添加了它的依赖项。我还为 react-native-reanimated 添加了 babel 插件依赖项在 babel.config.js如下:module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: ['react-native-reanimated/plugin'],};但是现在我在地铁服务器中遇到了这个错误:

error: index.js: Cannot find module 'react-native-reanimated/plugin' from '/home/nia/Downloads/YarAb'


我的 native 版本是 0.63.2

最佳答案

不幸的是,expo sdk v38 还不支持 reanimated v2,因为 "reanimated 2 onlysupports hermes at the moment" .
这个问题也记录在 react-native-reanimated v2 docs :“expo 支持尚未准备好,下一个 sdk 版本将支持 react native 0.62 - 这将允许您在弹出的 expo 应用程序中使用 reanimated 2。”
目前唯一的解决方案是弹出您的 expo 应用程序以使用 reanimated,或者查找 alternatives ,如 react-native-animatable .
https://github.com/software-mansion/react-native-reanimated/issues/886

关于javascript - 无法从/projectFolder 中找到模块 'react-native-reanimated/plugin',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63715979/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com