When using Cordova or ionic command lines,
NPM install-g Ios-deploy
or sudo npm install-g ios-deploy all error,
Such as:
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 15.3.0
NPM err! argv "/usr/local/bin/node" "/USR/LOCAL/BIN/NPM" "Install" "-G" "Ios-deploy"
NPM err! Node v5.8.0
NPM err! NPM v3.7.3
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 the most likely not a problem with NPM itself
NPM err! Enoent and is related to NPM, being able to find a file.
NPM err! Enoent
The problem solving method can be found in https://github.com/phonegap/ios-deploy/issues/188, which is actually:
sudo npm install-g ios-deploy--unsafe-perm=true
This time it gives a hint:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!! Warning:you is on OS X 10.11 El Capitan, your may need to add the
!!!! WARNING: '--unsafe-perm=true ' flag when running ' NPM install '
!!!! Warning:or else it would fail.
!!!! Warning:link:
!!!! Warning:https://github.com/phonegap/ios-deploy#os-x-1011-el-capitan
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Original: http://blog.csdn.net/cooldragon/article/details/50925633
NPM install-g Ios-deploy The solution to the failure problem reproduced