我在使用工作区的纱线monorepo内设置新的本机项目时遇到一些问题。我的根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