解决办法

sudo chown -R $USER /usr/local/bin

sudo chown -R $USER /usr/local/lib/node_modules