我在使用工作区的 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