Ionic-cli: ionic 2 recommendation for ios-deploy fails

Created on 9 Feb 2017  路  7Comments  路  Source: ionic-team/ionic-cli

_From @KevinBurton on February 9, 2017 14:8_

Ionic version: (check one with "x")
[ ] 1.x
[x ] 2.x

I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
ionic --version shows

******************************************************
 Dependency warning - for the CLI to run correctly,      
 it is highly recommended to install/upgrade the following:     

 Install ios-deploy to deploy iOS applications to devices.  `npm install -g ios-deploy` (may require sudo)

******************************************************

npm install -g ios-deploy fails with ENOENT

Rs-MacBook-Pro:elite-schedule-app-2.0final rebeccaannburton$ sudo npm install -g ios-deploy
npm WARN lifecycle [email protected]~preinstall: cannot run in wd %s %s (wd=%s) [email protected] ./src/scripts/check_reqs.js && xcodebuild /Users/rebeccaannburton/.nvm/versions/node/v7.5.0/lib/node_modules/.staging/ios-deploy-4e4d52dd
npm ERR! Darwin 16.4.0
npm ERR! argv "/Users/rebeccaannburton/.nvm/versions/node/v7.5.0/bin/node" "/Users/rebeccaannburton/.nvm/versions/node/v7.5.0/bin/npm" "install" "-g" "ios-deploy"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! path /Users/rebeccaannburton/.nvm/versions/node/v7.5.0/lib/node_modules/ios-deploy/build/Release/ios-deploy
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/rebeccaannburton/.nvm/versions/node/v7.5.0/lib/node_modules/ios-deploy/build/Release/ios-deploy'
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/rebeccaannburton/.nvm/versions/node/v7.5.0/lib/node_modules/ios-deploy/build/Release/ios-deploy'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/rebeccaannburton/Projects/elite-schedule-app-2.0final/npm-debug.log

Expected behavior:
Simply show the version or give a command that works.

Steps to reproduce:
ionic --version
sudo npm install -g ios-deploy

Related code:

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Your system information:

Cordova CLI: 6.4.0 
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.1.13
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: 5.0.13 
OS: macOS Sierra
Node Version: v7.5.0
Xcode version: Xcode 8.2.1 Build version 8C1002



******************************************************
 Dependency warning - for the CLI to run correctly,      
 it is highly recommended to install/upgrade the following:     

 Install ios-deploy to deploy iOS applications to devices.  `npm install -g ios-deploy` (may require sudo)

******************************************************

_Copied from original issue: driftyco/ionic#10371_

Most helpful comment

This worked fo me:

npm install -g ios-deploy --unsafe-perm=true

with sudo

All 7 comments

I am facing a similar issue

npm WARN lifecycle [email protected]~preinstall: cannot run in wd %s %s (wd=%s) [email protected] ./src/scripts/check_reqs.js && xcodebuild /usr/local/lib/node_modules/.staging/ios-deploy-298c9491
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-deploy"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! path /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy'
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

This worked fo me:

npm install -g ios-deploy --unsafe-perm=true

with sudo

Thank you for the solution @CesarOliveira !!! You saved my day !!!
Additional information :

---> sudo npm install -g ios-deploy --unsafe-perm=true

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!! WARNING: You are on OS X 10.11 El Capitan or greater, you may need to add the
!!!! WARNING: --unsafe-perm=true flag when running npm install
!!!! WARNING: or else it will fail.
!!!! WARNING: link:
!!!! WARNING: https://github.com/phonegap/ios-deploy#os-x-1011-el-capitan
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

i was having the same issue. thanks @CesarOliveira . this solution worked.

The warning mentions OS X 10.11 El Capitan . But I get the same issue on MacOS Sierra 10.12.3 as well. The above command still worked though.

thanks CesarOliveira

sudo npm install -g ios-deploy --unsafe-perm=true

Was this page helpful?
0 / 5 - 0 ratings