ios-deploy was not found

Ionic 打包ios的时候,突然报错,提示如下:

(node:1157) UnhandledPromiseRejectionWarning: ios-deploy was not found. Please download, build and install version 1.9.2 or greater from https://github.com/phonegap/ios-deploy into your path, or do 'npm install -g ios-deploy'
(node:1157) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1157) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[14:20:03] lint finished in 3.12 s

 

按照它的提示,直接输入命令 'npm install -g ios-deploy', 这样报了另外一个错

最后解决办法是修改了这个命令
sudo npm install -g ios-deploy --unsafe-perm=true --allow-root

参考:https://stackoverflow.com/questions/34733740/ios-deploy-not-found-under-os-x-el-capitan

原文地址:https://www.cnblogs.com/acm-bingzi/p/ios-deploy.html