2

我在使用工作区的 yarn monorepo 中设置新的 react-native 项目时遇到了一些问题。我的根 package.json 看起来像:

{
  "name": "mono-repo",
  "workspaces": {
    "packages": [
      "web-app",
      "utils",
      "mobile-app"
    ],
    "nohoist": [
      "**/jest",
      "**/jest/**",
      "**/mocha",
      "**/mocha/**",
      "**/react-native",
      "**/react-native/**"
    ]
  },

当我运行yarn run-ios构建成功但我得到捆绑器错误:

bundling failed: Error: Unable to resolve module `bugsnag-react-native` from `index.js`: bugsnag-react-native could not be found within the project or in these directories:
  ../node_modules

bugsnag-react-native文件夹确实存在于根目录中node_modules

有谁知道这里可能发生什么/如何解决它?

我正在使用纱线版本1.19.0

4

0 回答 0