npm install -g ios-deploy
失败
npm install -g ios-deploy
Downloading ios-deploy to /usr/local/lib/node_modules/ios-deploy_tmp
Copying /usr/local/lib/node_modules/ios-deploy_tmp/_ios-deploy@1.9.3@ios-deploy to /usr/local/lib/node_modules/ios-deploy
Installing ios-deploy's dependencies to /usr/local/lib/node_modules/ios-deploy/node_modules
scripts.preinstall ios-deploy@1.9.3 "./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
Install fail! Error: Run "sh -c ./src/scripts/check_reqs.js && xcodebuild" error, exit code 1
Error: Run "sh -c ./src/scripts/check_reqs.js && xcodebuild" error, exit code 1
at ChildProcess.proc.on.code (/usr/local/lib/node_modules/cnpm/node_modules/runscript/index.js:74:21)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
npminstall version: 3.11.0
npminstall args: /usr/local/Cellar/node/10.6.0/bin/node /usr/local/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --fix-bug-versions --china --userconfig=/Users/dongouc/.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://registry.npm.taobao.org -g ios-deploy
修改方案
sudo npm install -g ios-deploy --unsafe-perm=true