Reputation: 97
I was trying to install Cordova by using npm, but it took more than one hour, and then I gave up. Later I tried to follow the instruction from http://cordova.apache.org/, and the error occurred when I executed npm install -g ios-deploy
.
Here is what I get in command line:
YangHenrydeMacBook-Pro:~ Yong$ sudo npm install -g ios-deploy npm WARN lifecycle [email protected]~preinstall: cannot run in wd %s %s (wd=%s) [email protected] ./src/check_reqs.js && xcodebuild /usr/local/lib/node_modules/.staging/ios-deploy-fbfd9f76b9a8909271fae167aab47715
npm ERR! Darwin 14.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-deploy"
npm ERR! node v5.1.1
npm ERR! npm v3.3.12
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 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/Yong/npm-debug.log
Could anyone give me some hints? Thanks!
Upvotes: 3
Views: 1437
Reputation: 1108
For completeness sake, @Sam003's answer is right, using the --unsafe-perm=true
is the recommended-by-node way to install modules under MacOS 10.11 and later.
From an nmp install:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!! 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
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Upvotes: 2