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

React Native iOS环境部署:无法通过npm安装ios-deploy

React Native iOS环境搭建:ios-deploy安装失败问题

按照React Native官方iOS环境搭建指南操作,React已成功安装,但执行npx react-native run-ios启动模拟器应用时,触发错误提示:

error Failed to install the app on the device because we couldn't execute the "ios-deploy" command. Please install it by running "npm install -g ios-deploy" and try again.

执行npm install -g --verbose ios-deploy尝试安装时,出现编译失败,完整错误日志如下:

> $ npm install -g --verbose ios-deploy
npm verb cli /usr/local/Cellar/node/20.0.0/bin/node /usr/local/bin/npm
npm info using npm@9.6.4
npm info using node@v20.0.0
npm verb title npm install ios-deploy
npm verb argv "install" "--global" "--loglevel" "verbose" "ios-deploy"
npm verb logfile logs-max:10 dir:/Users/steve/.npm/_logs/2023-04-19T13_54_42_397Z-
npm verb logfile /Users/steve/.npm/_logs/2023-04-19T13_54_42_397Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/ios-deploy 13ms (cache hit)
npm info run ios-deploy@1.12.1 preinstall node_modules/ios-deploy ./src/scripts/check_reqs.js && xcodebuild
npm info run ios-deploy@1.12.1 preinstall { code: 65, signal: null }
npm verb stack Error: command failed
npm verb stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
npm verb stack     at ChildProcess.emit (node:events:511:28)
npm verb stack     at maybeClose (node:internal/child_process:1098:16)
npm verb stack     at Socket.<anonymous> (node:internal/child_process:456:11)
npm verb stack     at Socket.emit (node:events:511:28)
npm verb stack     at Pipe.<anonymous> (node:net:334:12)
npm verb pkgid ios-deploy@1.12.1
npm verb cwd /Users/steve/workshop/AwesomeProject
npm verb Darwin 22.4.0
npm verb node v20.0.0
npm verb npm  v9.6.4
npm ERR! code 65
npm ERR! path /usr/local/lib/node_modules/ios-deploy
npm ERR! command failed
npm ERR! command sh -c ./src/scripts/check_reqs.js && xcodebuild
npm ERR! Command line invocation:
npm ERR!     /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
npm ERR!
npm ERR! User defaults from command line:
npm ERR!     IDEPackageSupportUseBuiltinSCM = YES
npm ERR!
npm ERR! Computing target dependency graph and provisioning inputs
npm ERR!
npm ERR! Create build description
npm ERR! Build description signature: 7704f57eed1e3af474161959e18555e2
npm ERR! Build description path: /usr/local/lib/node_modules/ios-deploy/build/XCBuildData/7704f57eed1e3af474161959e18555e2.xcbuilddata
npm ERR!
npm ERR! warning: Building targets in manual order is deprecated - check "Parallelize build for command-line builds" in the project editor, or set DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING in any of the targets in the current build to suppress this warning
npm ERR! CreateBuildDirectory /usr/local/lib/node_modules/ios-deploy/build
npm ERR!     cd /usr/local/lib/node_modules/ios-deploy/ios-deploy.xcodeproj
npm ERR!     builtin-create-build-directory /usr/local/lib/node_modules/ios-deploy/build

<snip>

npm ERR! ** BUILD FAILED **
npm ERR!
npm ERR!
npm ERR! The following build commands failed:
npm ERR!        Ld /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/x86_64/Binary/ios-deploy normal x86_64 (in target 'ios-deploy' from project 'ios-deploy')
npm ERR! (1 failure)
npm verb exit 65

已尝试以下方法但均未解决问题:

  • 查阅React Native官方故障排查文档
  • 测试Stack Overflow上的相关解决方案

内容的提问来源于stack exchange,提问作者StevieD

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.24 11:25:00