例如
npm i nrm -g
报 Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nrm'
在命令前加上sudo即可
如:
sudo npm i nrm -g