I\'m trying to update my nodejs v4.2.1 to the latest version and successfully got that. But node -v still gives me \'-v4.2.1\'.
node -v
Your path contains /usr/local/bin before /usr/local/Cellar. Since the version of node you're using is the homebrew one, fix it with:
/usr/local/bin
/usr/local/Cellar
node
homebrew
PATH="/usr/local/Cellar:$PATH"
Next time you have a problem with brew, run brew doctor, it would have told you what to do
brew doctor