sh: 1: node: Permission denied

problem

> node install.js

sh: 1: node: Permission denied

solved

npm config set user 0
npm config set unsafe-perm true
sudo npm install -g sm