how to resolve bug of xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

0x00 现象

Scanning 643 folders for symlinks in /node_modules (14ms)
Found Xcode workspace xxxxx.xcworkspace
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

Command failed: xcrun instruments -s
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! leyeah@0.0.1 react-native-ios: `react-native  run-ios`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the leyeah@0.0.1 react-native-ios script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/wangxiaolong/.npm/_logs/2018-01-09T02_42_18_322Z-debug.log

Process finished with exit code 1

0x01 解决方案

解决方法:在 终端执行如下命令 sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/
注意:前提是你已经安装了xcode
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容