小D开发系列教程

node系列-安装nvm

2021-01-14  本文已影响0人  司司

引言

nvm的好处是方便管理node的版本,可以多版本并存。

1. 准备工作

安装前卸载完全node

2. 安装

github链接

第一种

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash

第二种

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash

环境变量

The script clones the nvm repository to ~/.nvm and adds the source line to your profile (~/.bash_profile, ~/.zshrc, ~/.profile, or~/.bashrc).

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

mac

windows

3. 常用命令

本篇node系列软件都会在我的github上收录:Dc-Notes

上一篇 下一篇

猜你喜欢

热点阅读