when I install ios-deploy via npm

1
npm install -g ios-deploy

I got an error below

1
2
3
4
> ios-deploy@1.9.3 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

I searched a answer which switches path of xcode-select.

I found my path is

1
2
$ xcode-select -p
/Library/Developer/CommandLineTools

and I changed it to this.

1
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

successed.

PS: after I changed path of xcode-select, I got a warning below….umm…. I think it should warn me earlier…

1
2
3
4
5
6
7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!! 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-or-greater
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

reference: [1]IonicのiOSのビルドのエラー


creativ common license