mac下cordova的ios-deploy安装问题

Posted brave-sailor

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mac下cordova的ios-deploy安装问题相关的知识,希望对你有一定的参考价值。

mac下进行cordova项目编译部署到ios设备,这个时候需要安装ios-deploy,会失败:

npm WARN lifecycle [email protected]1.8.6~preinstall: cannot run in wd %s %s (wd=%s) [email protected]1.8.6 ./src/scripts/check_reqs.js && xcodebuild /usr/local/lib/node_modules/.staging/ios-deploy-298c9491
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-deploy"
npm ERR! node v4.4.2
npm ERR! npm  v3.8.6
npm ERR! path /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy
npm ERR! enoent ENOENT: no such file or directory, chmod /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/x5/corProject/testApp/npm-debug.log

但是没法,需要安装这个才可以部署到ios设备

后来找了找,发现sudo npm install -g ios-deploy --unsafe-perm=true可以成功安装。

这个时候可以使用cordova run ios进行ios部署了

以上是关于mac下cordova的ios-deploy安装问题的主要内容,如果未能解决你的问题,请参考以下文章

Mac下Cordova开发环境搭建

mac下配置phonegap(cordova)5.1.1开发环境

构建 Cordova ios 应用程序是不是总是需要 CocoaPods?

MAC OSX环境下cordova+Ionic的安装配置

npm install -g ios-deploy 失败问题的解决方法 转载

无法安装 Cordova 插件条形码 Phonegap (mac)