Closed guiix-code closed 9 years ago
Does installing other npm modules globally work? The module does attempt to build a binary, and may use the tmp folder, not sure.
Other npm modules install globally fine, yes.
Is there any way to check which file it fails to get permissions for?
You could try download the source: http://github.com/phonegap/ios-deploy and run "make" to see if that causes problems if that doesn't it might be wherever node tries to install it.
Oddly enough, making ios-deploy-master by itself works fine. But not "npm install ios-deploy -g"
The npm-debug.log file has the following lines of interest:
56 verbose tar unpacking to /usr/local/lib/node_modules/ios-deploy
57 verbose gentlyRm vacuuming /usr/local/lib/node_modules/ios-deploy
58 silly gunzTarPerm modes [ '755', '644' ]
59 silly gunzTarPerm extractEntry package.json
60 silly gunzTarPerm extractEntry .npmignore
61 silly gunzTarPerm extractEntry README.md
62 silly gunzTarPerm extractEntry LICENSE
63 silly gunzTarPerm extractEntry resources/buildbox/build.sh
64 silly gunzTarPerm extractEntry Makefile
65 silly gunzTarPerm extractEntry CONTRIBUTING.md
66 silly gunzTarPerm extractEntry Entitlements.plist
67 silly gunzTarPerm extractEntry ResourceRules.plist
68 silly gunzTarPerm extractEntry demo.c
69 silly gunzTarPerm extractEntry ios-deploy.c
70 silly gunzTarPerm extractEntry Info.plist
71 silly gunzTarPerm extractEntry MobileDevice.h
72 info preinstall ios-deploy@1.5.0
73 verbose unsafe-perm in lifecycle false
74 info ios-deploy@1.5.0 Failed to exec preinstall script
75 verbose unlock done using /Users/Henry/.npm/_locks/ios-deploy-198957223cd98201.lock for /usr/local/lib/node_modules/ios-deploy
76 verbose stack Error: ios-deploy@1.5.0 preinstall: make ios-deploy
76 verbose stack Exit status 2
76 verbose stack at EventEmitter.
Fix found:
sudo npm install --global --unsafe-perm ios-deploy
Thanks doomsy. This did the trick for me
Thanks to doomsy. Help me a lot
Yes thank you doomsy! It did work for me too.
worked for me as well! Thank you
Thanks, doomsy! Worked for me as well
Thanks, doomsy! Worked for me as well
:+1:
Thank you doomsy! Saved my day.
Thanks!
Thank you!
Thanks to doomsy. Help me a lot
Works great thanks @doomsy
This is helpful, and does work, but you know... crazy idea... maybe somebody could update the actual DOCS with this fact, so a thousand people don't separately have to google this ticket.
Maybe you should actually see that the docs have this before making this assertion? Hint: it does
hahaha
Fair enough, the docs for ios-deploy indeed do mention it... it would be nice if the cordova docs did, too. https://cordova.apache.org/docs/en/5.4.0/guide/platforms/ios/
You are officially my hero. Thank you.
just helped me too, thanks!
Tons of Thanks @doomsy
Thanks : ) @doomsy: sudo npm install --global --unsafe-perm ios-deploy did the trick
Thanks - that what i needed
@doomsy Thanks Man!
@doomsy Thanks a bunch Man!!
@doomsy Thanks.
Thanks @doomsy ,it works
Thanks @doomsy
Thanks @doomsy Saved my day!
Thanks @doomsy
thank you @doomsir
Thanks @doomsy!
Thank you, huh. It looks bad, if too many people get this error...
Works like a charm. Thanks @doomsy Saved my day!
Works fine Thx
Hey @doomsy, I guess I'm really unlucky today. Still getting the following error after sudo npm install --global --unsafe-perm ios-deploy. I'm running on Mac 10.9.5 and don't have Xcode installed yet. It's probably 'cause of that. I'm not sure.
|
> ios-deploy@1.8.6 preinstall /usr/local/lib/node_modules/ios-deploy
> ./src/scripts/check_reqs.js && xcodebuild
stderr: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
npm ERR! Darwin 13.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--global" "--unsafe-perm" "ios-deploy"
npm ERR! node v4.4.0
npm ERR! npm v2.14.20
npm ERR! code ELIFECYCLE
npm ERR! ios-deploy@1.8.6 preinstall: `./src/scripts/check_reqs.js && xcodebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ios-deploy@1.8.6 preinstall script './src/scripts/check_reqs.js && xcodebuild'.
npm ERR! This is most likely a problem with the ios-deploy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./src/scripts/check_reqs.js && xcodebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ios-deploy
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls ios-deploy
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/sunandasamaddar/npm-debug.log
thanks @doomsy ! you're a lifesaver!
@SunandoSamaddar
Yes, you need XCode installed first. I ran into this just today. On your Mac: App Store
Top right, search for "Xcode".. and install.
Good luck
Thank you very much.
after using @doomsy 's sudo npm install --global --unsafe-perm ios-deploy Everything looks fine:
** BUILD SUCCEEDED **
/Users/Saporules/.npm-packages/bin/ios-deploy -> /Users/Saporules/.npm-packages/lib/node_modules/ios-deploy/build/Release/ios-deploy
/Users/Saporules/.npm-packages/lib
└── ios-deploy@1.8.6
But after that I check with $ ionic info
it throws the following:
Your system information:
Cordova CLI: 6.2.0
Ionic Framework Version: 1.3.1
Ionic CLI Version: 1.7.15
Ionic App Lib Version: 0.7.2
ios-deploy version: Not installed
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v5.5.0
Xcode version: Xcode 7.3.1 Build version 7D1014
******************************************************
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)
******************************************************
:( any Idea why?
Please update cordova guide !
That seems to be an ionic command output - please contact them to update.
@doomsy So cool! Works for me! Thank you very much!
Thanks @doomsy
is not working for me
OSX 10.10.2. ios-deploy: command not found Xcode 6.2 (Build 6C131e) /Applications/Xcode.app/Contents/Developer
Doing an upgrade from Cordova iOS 3.5. Updated cordova to 4.3.
Running command (as root):
npm install ios-deploy -g
Error:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied make: getcwd: Permission denied rm -rf .app demo ios-deploy shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied gcc -ObjC -g -o ios-deploy -framework Foundation -framework CoreFoundation -framework MobileDevice -F/System/Library/PrivateFrameworks ios-deploy.c clang: error: unable to make temporary file: Permission denied make: ** [ios-deploy] Error 1 npm ERR! ios-deploy@1.4.0 preinstall:
make ios-deploy
npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the ios-deploy@1.4.0 preinstall script. npm ERR! This is most likely a problem with the ios-deploy package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! make ios-deploy npm ERR! You can get their info via: npm ERR! npm owner ls ios-deploy npm ERR! There is likely additional logging output above.npm ERR! System Darwin 14.1.0 npm ERR! command "node" "/usr/local/bin/npm" "install" "ios-deploy" "-g" npm ERR! cwd /usr/local/bin npm ERR! node -v v0.10.30 npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /usr/local/bin/npm-debug.log npm ERR! not ok code 0
Have tried switching from gcc to clang. Both produce the same error.
I had tried to fix permissions where it had indicated. The script successfully creates (and later removes) the directory:
/usr/local/lib/node_modules/ios-deploy
But can't seem to write inside the directory it creates (even as root). Unless there's another location it is trying to access?