whether I use .pkg from nodejs.com or brew install node, the node can be successfully installed but not the npm.
WineHouse:~ yj$ node -v
WineHouse:~ yj$ npm
-bash: npm: command not found
WineHouse:~ yj$ brew install npm
Warning: node-4.2.1 already installed
Follow the solution provided in the gist: Fixing npm On Mac OS X for Homebrew Users