Xcode14.3构建Expo项目失败:操作不被允许
Expo多页面项目Xcode构建失败:Operation not permitted错误排查
之前成功用Xcode构建仅含App.js的基础Expo项目(无额外依赖包与页面),现在创建多页面项目,引入的依赖包如下:
"@react-navigation/bottom-tabs": "^6.5.11", "@react-navigation/native": "^6.1.9", "@react-navigation/native-stack": "^6.9.17", "expo": "~49.0.15", "expo-linear-gradient": "^12.5.0", "expo-modules-autolinking": "^1.5.1", "expo-splash-screen": "~0.20.5", "expo-status-bar": "~1.6.0", "expo-system-ui": "~2.4.0", "react": "18.2.0", "react-native": "0.72.6", "react-native-bouncy-checkbox": "^3.0.7", "react-native-dotenv": "^3.4.9", "react-native-masked-text": "^1.13.0", "react-native-progress": "^5.0.1", "react-native-safe-area-context": "4.6.3", "react-native-screens": "~3.22.0", "react-native-webview": "^13.6.3"
执行与基础项目相同的步骤:
npm installnpx expo run:ioscd iospod install
之后在Xcode中打开项目时出现构建错误:
/bin/bash: /Users/[USER]/Documents/GitHub/[PROJECT]/ios/Pods/../../node_modules/react-native/ReactCommon/../scripts/xcode/with-environment.sh: Operation not permitted Command PhaseScriptExecution failed with a nonzero exit code
已尝试以下操作,但均无效:
- 修改
with-environment.sh文件权限 - 以root身份打开Xcode
怀疑是某个依赖包导致的问题,恳请提供解决帮助。
本地环境版本:
[USER]@MacBook-2 ios % npx -v 9.8.1 [USER]@MacBook-2 ios % npx expo -v 0.10.16 [USER]@MacBook-2 ios % node -v v18.18.0
内容的提问来源于stack exchange,提问作者Marc Loeffler
相关产品推荐
相关产品推荐

