美文网首页
nvm安装与使用

nvm安装与使用

作者: zzzxy_ | 来源:发表于2020-01-08 10:53 被阅读0次

不要使用homebrew安装
1.打开终端,显示home目录下的所有文件,查看是否存在.bash_profile这个文件

ls -a

2.如果没有则新建

touch ~/.bash_profile

3.安装(以下命令任取一种)

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

4.重启终端,输入nvm,就会出现 Node Version Manager 帮助文档


安装指定版本node

nvm install v12.4.0

设置默认node版本:

nvm use default version

切换node版本

nvm use 12.4.0

相关文章

网友评论

      本文标题:nvm安装与使用

      本文链接:https://www.haomeiwen.com/subject/gzwjactx.html