nvm是什么?
nvm(Node Version Manager),node版本管理工具。
如何使用
1. Ubuntu 16.04下安装
install or update
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.2/install.sh | bash
当前环境生效
source ~/.bashrc
查看远程node版本,方便根据node版本安装
nvm ls-remote
安装node
nvm uninstall 10.0
卸载node
nvm uninstall 10.0
问题排查
卸载报错
root@istudy:/home/tools/code/bison# nvm uninstall 10.0nvm: Cannot uninstall currently-active node version, v10.0.0 (inferred from 10.0).
解决方法: deactvie当前版本
nvm deactivate