標題通り、nodebrewでnode.jsの別バージョンをインストールする時に以下のエラーが出た。
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation xcrun: error: unable to lookup item 'PlatformPath' in SDK '/'
で、node.jsが正常にインストールされない。
xcodeがインストールされてない、もしくはコマンドラインツールが正常に動作していないエラーらしい。
解決方法は以下のコマンドを打ち込む
xcode-select --install xcode-select --switch /Applications/Xcode.app