sudo npm install -g --unsafe-perm=true --allow-root
sudo chmod -R 777 /yourProjectDirectoryName
npm install -g npm stable
chmod g+rwx /root /root/.config /root/.config/configstor
sudo chown -R `whoami` ~/.npm
sudo chown -R `whoami` /usr/local/lib/node_modules
sudo chown -R username path
sudo chmod -R 777 /Users/sharatakasapu/{your node module path}