[英]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.