IOS 的 ionic 2 构建失败

Build Failed in ionic 2 for IOS

运行 ionic cordova build ios 将导致以下错误:

Preparing Firebase on iOS
IOS project Code Sign Entitlements now set to: LifeBuddy/Resources/LifeBuddy.entitlements
Entitlements file is in reference section.
Error: 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'

[ERROR] An error occurred while running cordova build ios (exit code 1).

当 运行 建议的命令 npm install -g ios-deploy 我收到此错误:

The following build commands failed:
        Check dependencies
        Write auxiliary files
(2 failures)
npm ERR! code ELIFECYCLE
npm ERR! errno 65
npm ERR! ios-deploy@1.9.3 preinstall: `./src/scripts/check_reqs.js && xcodebuild`
npm ERR! Exit status 65
npm ERR! 
npm ERR! Failed at the ios-deploy@1.9.3 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dev-13/.npm/_logs/2018-07-31T08_07_03_860Z-debug.log

试试这个, sudo npm install -g ios-deploy --unsafe-perm=true