Mac Angular打包報錯:node
Error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instanceios
Angular項目運行,打包需安裝環境以下:gulp
1:安裝node(本身去官網下載指定版本安裝,Angular1.0這種過期的項目是不支持高版本node的),cordova,gulp等。xcode
2:安裝xcode。app
運行打包命令:gulp build:ios:release 報錯如上所述,因爲咱們在蘋果商店下載的程序安裝在Applications目錄,與/Library/Developer/CommandLineTools目錄不一致。ui
解決方案:spa
使用如下命令把 xcode 的路徑修改成你安裝的位置便可
code
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer