问题
I am trying to install APPIUM on my machine and want to run it in actual device, for that i have to install the command 'npm install -g ios-deploy' but when i am trying to install it is dispalying the error.
Error:
he following build commands failed: PhaseScriptExecution Run\ Script build/ios-deploy.build/Release/ios-deploy.build/Script-C0CD3D981F59D20100F954DB.sh
(1 failure)
npm ERR! code ELIFECYCLE
npm ERR! errno 65
npm ERR! ios-deploy@1.9.2 preinstall: ./src/scripts/check_reqs.js && xcodebuild
npm ERR! Exit status 65
npm ERR!
npm ERR! Failed at the ios-deploy@1.9.2 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/synerzip/.npm/_logs/2018-07-21T10_30_21_090Z-debug.log syn-macmini-03:~ synerzip$ xcodebuild xcodebuild: error: The directory /Users/synerzip does not contain an Xcode project.
Solution Tried:
- sudo npm install -g ios-deploy
- npm install -g ios-deploy --unsafe-perm=true
- npm install -g ios-deploy --allow-root
Details:
OS: 1.13.6
xcode version: 9.4.1
node version: v10.7.0
Note when i run the command 'xcode-select --print-path' following path display, "/Applications/Xcode.app/Contents/Developer"
Can Any help me on this.
Thanks.
回答1:
I have tried the following steps sequentially and it works for me.
- sudo npm uninstall -g ios-deploy
- brew install ios-deploy
@Paul - Thanks for looking in it.
回答2:
I could fix the problem by installing the "Xcode 10 beta 4" on my computer. Another solution is provided on GitHub - check out the following links.
- https://github.com/ios-control/ios-deploy/issues/346
- https://github.com/ios-control/ios-deploy/issues/349#issuecomment-405937763
回答3:
After the below command
$ npm uninstall -g ios-deploy
You should restart your command line. And than you can run below line on command line.
$ brew upgrade ios-deploy
回答4:
I have Fixed it with following STEPS... (Ignore steps if you have already done it)
Debug on real iOS device iONIC App
Install brew( with command on terminal ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”)
Install Xcode
Run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Install iOS-deploy (brew install ios-deploy)
Build iOS with ionic cordova build ios --buildFlag="-UseModernBuildSystem=0"
Go to Xcode and set provisioning profile certificate
Attach device and run command on terminal ionic cordova run ios --buildFlag="-UseModernBuildSystem=0"
First it will fail as you need to Go to setting—>General -.>Device management->Click on your development certificate->Trust.
Done now you can run your ionic app on your real iOS device directly with just ionic cordova run ios --buildFlag="-UseModernBuildSystem=0"
Cheers!!!!!!!!!
回答5:
To use ios-deploy as a command-line tool it is recommended you now install it directly via Homebrew(and if you have already installed it via npm to uninstall it).
https://github.com/ios-control/ios-deploy#installation
The Homebrew and npm versions will be updated at the same time going forward.
来源:https://stackoverflow.com/questions/51455401/npm-install-g-ios-deploy-didnt-work-it-displays-error