1.安装nodejs
sudo apt-get install nodejs
sudo apt-get install nodejs-legacy
安装后 , 输入node -v 查看ndoe版本信息
2.安装npm
sudo apt-get install npm
安装后, 输入npm -v 查看npm版本信息
3.安装nrm
nrm 主要用于切换npm 下载源
sudo npm install nrm
安装后 , 输入 nrm -h查看相关信息
nrm ls:查看有多少个源
nrm use:使用哪个院
nrm add:添加源
nrm del:删除源