当我从github、yarn install、cd ios克隆react原生项目时,我收到以下错误
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
此外,当我在Xcode中打开. xcworkspace时,我收到错误:
library not found for BugsnagReactNative
pack. json是:
{
"name": "proj",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"build": "CI= npm run build",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@bugsnag/react-native": "^7.16.2",
"@react-native-async-storage/async-storage": "^1.15.6",
"@react-native-community/checkbox": "^0.5.8",
"@react-native-community/datetimepicker": "^4.0.1",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-community/netinfo": "^6.0.0",
"@react-navigation/bottom-tabs": "^6.0.5",
"@react-navigation/native": "^6.0.2",
"@react-navigation/stack": "^6.0.7",
"amazon-cognito-identity-js": "^5.1.0",
"aws-amplify": "^4.2.4",
"axios": "^0.21.1",
"package": "^1.0.1",
"prop-types": "^15.7.2",
"react": "17.0.2",
"react-native": "0.66.3",
"react-native-carousel": "^0.12.0",
"react-native-codegen": "^0.0.7",
"react-native-collapsible": "^1.6.0",
"react-native-date-picker": "^4.1.1",
"react-native-dropdown-picker": "^5.1.23",
"react-native-exit-app": "^1.1.0",
"react-native-gesture-handler": "^1.10.3",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-mask-input": "^1.0.3",
"react-native-modal-dropdown": "^1.0.1",
"react-native-month-year-picker": "^1.8.0",
"react-native-safe-area-context": "^3.3.0",
"react-native-screens": "^3.13.1",
"react-native-select-dropdown": "^1.1.0",
"react-native-snap-carousel": "^3.9.1",
"tcomb-form-native": "^0.6.20",
"toggle-switch-react-native": "^3.2.0",
"yarn": "^1.22.17"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/runtime": "^7.15.3",
"@bugsnag/source-maps": "^2.3.1",
"@react-native-community/eslint-config": "^3.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "26.6.3",
"eslint": "7.32.0",
"jest": "^27.0.6",
"metro-react-native-babel-preset": "^0.66.2",
"react-test-renderer": "17.0.2"
},
"jest": {
"preset": "react-native"
}
}
下面我尝试的解决方案不起作用。
>
yarn添加global@bugsnag/react-native-cli
将rct-folly部署目标更改为9.0
将仅构建活动架构设置为是
在xcode中单击并安装ios 13.0模拟器
删除构建设置中的搜索路径删除pods文件夹,并再次安装pod
删除“其他链接器标志”列表中的所有行,但仅当$(继承)位于顶部时
pod更新
重新安装ruby/gem
卸载并重新安装Cocoapods
rm-rfnode_modules,纱线缓存清理
删除podfile. lock和pod,重新安装它们
sudo arch-x86_64gem install ffi, arch-x86_64pod install
卸载重装值班人
检查节点版本、react原生版本和bugsnag版本
从包中注释掉错误拦截依赖。json
多次重新安装
试试这个
npx@bugsnag/react-native-cli初始化
并检查bugsnag留档,因为您需要在bugsnag上有一个可用的项目