Solved BUILD FAILED sudo npm install -g ios-deploy


by Maihan Nijat
Installing ios-deploy plugin for Apache Cordova fails if you are running OS X 10.11 El Capitan or greater. You can see the following lines in the command line which says:
error: Unable to create directory: /usr/local/lib/node_modules/ios-deploy/build (Permission denied)
error: Unable to create directory: /usr/local/lib/node_modules/ios-deploy/build (Permission denied)
You can also the following warning:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!! WARNING: You are on OS X 10.11 El Capitan or greater, you may need to add the
!!!! WARNING:--unsafe-perm=true
flag when runningnpm install
!!!! WARNING: or else it will fail.
!!!! WARNING: link:
!!!! WARNING: https://github.com/phonegap/ios-deploy#os-x-1011-el-capitan
Follow the instruction in the warning to have a successful installation. I use the following line to allow unsafe installation.
sudo npm install --global --unsafe-perm ios-deploy
Recent Posts
Privacy Policy for Keyboard
April 22, 2024

How to fix the MAC question mark folder issue?
August 3, 2021

What is JavaScript Promise – Explained with examples?
March 23, 2021