gpt4 book ai didi

android - 错误 : index. js:找不到模块 'babel-plugin-r' React Native

转载 作者:行者123 更新时间:2023-12-05 00:43:42 26 4
gpt4 key购买 nike

我做了什么导致错误:我有一个新安装的 Bare React Native Project 。我想使用抽屉导航,不得不安装 React Native Reanimated 2.3.0-alpha.2 。

我已经尝试解决的错误

错误

bundle ./index.js

错误:index.js:找不到模块“babel-plugin-r”需要堆栈:

  • D:\Work\React Native\React Native 与 Node\healthapp\node_modules@babel\core\lib\config\files\plugins.js
  • D:\Work\React Native\React Native 与 Node\healthapp\node_modules@babel\core\lib\config\files\index.js
  • D:\Work\React Native\React Native 与 Node\healthapp\node_modules@babel\core\lib\index.js
  • D:\Work\React Native\React Native with Node\healthapp\node_modules\metro-transform-worker\src\index.js
  • D:\Work\React Native\React Native 与 Node\healthapp\node_modules\metro\src\DeltaBundler\Worker.js
  • D:\Work\React Native\React Native with Node\healthapp\node_modules\metro\node_modules\jest-worker\build\workers\processChild.js

最佳答案

希望您已经解决了这个问题。但是以防万一或其他人在我的情况下需要它,这是由于我从说明中复制这部分代码时留下的省略号(...):

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
... //<---HERE Remove this
'react-native-reanimated/plugin',
],
};

https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/

关于android - 错误 : index. js:找不到模块 'babel-plugin-r' React Native,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68972567/

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