Open your ~/.bash_profile add this line
export NODE_PATH=/usr/local/lib/node_modules
Save ~/.bash_profile