Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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! [email protected] preinstall: ./src/scripts/check_reqs.js && xcodebuild npm ERR! Exit status 65 npm ERR! npm ERR! Failed at the [email protected] 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.

like image 539
Girish Avatar asked Jul 21 '18 11:07

Girish


3 Answers

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.

like image 148
Girish Avatar answered Nov 05 '22 16:11

Girish


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!!!!!!!!!

like image 25
Parag Shinde Avatar answered Nov 05 '22 15:11

Parag Shinde


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.

like image 33
Gabe Avatar answered Nov 05 '22 16:11

Gabe