npm install -g ios-deploy didn't work , it displays error

╄→гoц情女王★ 提交于 2020-01-24 05:51:04

问题


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:

  1. sudo npm install -g ios-deploy
  2. npm install -g ios-deploy --unsafe-perm=true
  3. 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.

  1. sudo npm uninstall -g ios-deploy
  2. 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

  1. Install brew( with command on terminal ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”)

  2. Install Xcode

  3. Run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

  4. Install iOS-deploy (brew install ios-deploy)

  5. Build iOS with ionic cordova build ios --buildFlag="-UseModernBuildSystem=0"

  6. Go to Xcode and set provisioning profile certificate

  7. Attach device and run command on terminal ionic cordova run ios --buildFlag="-UseModernBuildSystem=0"

  8. First it will fail as you need to Go to setting—>General -.>Device management->Click on your development certificate->Trust.

  9. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!