mac终端直接安装nvm

安装前,需确保没有node环境。

nvm不支持Windows系统,如果你使用的是Windows系统,可以使用nvmw代替。

安装nvm(https://github.com/nvm-sh/nvm)

   通过curl安装:

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

   通过wget安装:

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

安装Node.js和NPM

       nvm install 版本号

      检查是否安装成功:node -v, npm -v

安装完成后,切换到该版本。

        nvm use 版本号

 

你可能感兴趣的:(node.js,node.js)