首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到模块'babel-plugin-r‘

找不到模块'babel-plugin-r‘
EN

Stack Overflow用户
提问于 2021-03-19 07:49:39
回答 1查看 730关注 0票数 1

运行本机代码时出现以下错误,请帮助我

错误: index.js:无法找到模块‘babel-plugin’要求堆栈:

  • /home/Documents/Assignment3/node_modules/@babel/core/lib/config/files/plugins.js
  • /home/Documents/Assignment3/node_modules/@babel/core/lib/config/files/index.js
  • /home/Documents/Assignment3/node_modules/@babel/core/lib/index.js
  • /home/Documents/Assignment3/node_modules/metro-transform-worker/src/index.js
  • /home/Documents/Assignment3/node_modules/metro/src/DeltaBundler/Worker.js
  • /home/Documents/Assignment3/node_modules/jest-worker/build/workers/processChild.js
EN

回答 1

Stack Overflow用户

发布于 2022-08-04 14:04:51

当我使用需要react-native-reanimated.的react导航时,我也遇到了同样的问题。为了继续,在遵循文档中提到的说明之后,我省略了以下三点:

代码语言:javascript
复制
    module.exports = function (api) {
      api.cache(true);
      return {
        presets: ["babel-preset-expo"],
        //...   <=== this three dots caused the problem
        plugins: ["react-native-reanimated/plugin"],
      };
    };

为我解决了这个问题。原来的答案链接是这里

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66704298

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档