Seven years ago in 2012 I spoke at RubyConf China 2012. It was a technical talk on how to become a better developer, if you're interested…
Recently Node.js has made some changes so that it no longer installs on OS X via homebrew if you don’t have Xcode installed.
If you run
brew install nodejs, you will get the following error:
\> Error: Failed executing: make install (node.rb:28)
And if you run
brew install -v nodejs, you will discover this line:
\> xcode-select: Error: No Xcode is selected. Use xcode-select -switch , or see the xcode-select manpage (man xcode-select) for further information.
The fix? It’s actually quite easy, simply do:
sudo xcode-select --switch /usr/bin
And voila! You can now install Node.js just fine. :)