Node 备忘

nvm

  • root 用户没有 npm 命令

From: https://stackoverflow.com/questions/21215059/cant-use-nvm-from-root-or-sudo

1
2
3
4
5
# run this
n=$(which node); \
n=${n%/bin/node}; \
chmod -R 755 $n/bin/*; \
sudo cp -r $n/{bin,lib,share} /usr/local