You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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 install
  • npx expo run:ios
  • cd ios
  • pod 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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 22:31:16