我想把我的Node版本从最新版本降级到v6.10.3。

但到目前为止,一切都无济于事。尝试了NVM,它也给出了一个错误,说make command is not found。如何降级Node?


当前回答

确定Node版本

node -v  // or node --version
npm -v   // npm version or long npm --version

确保已安装n个

sudo npm install -g n // -g for global installation 

升级到最新的稳定版本

sudo n stable

更改到特定版本

sudo n 10.16.0

回答这篇文章的启发。

其他回答

对于windows,其中一个选项是卸载当前版本的Node。然后,转到节点网站,下载所需的版本并安装最后一个版本。

在Mac中有一个快速的brew方法:

brew search node

你会看到一些版本,例如:node@10 node@12…然后

brew unlink node

现在选择以前的版本,例如node@12

brew link --overwrite --force node@12

准备,您已经降低了节点版本。

尝试使用以下命令

//For make issues 
sudo apt-get install build-essential

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

//To uninstall a node version 
nvm uninstall <current version>

nvm install 6.10.3

nvm use 6.10.3

//check with 
node -v
 curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
 sudo npm install -g n
 sudo n 10.15
 npm install
 npm audit fix
 npm start

确定Node版本

node -v  // or node --version
npm -v   // npm version or long npm --version

确保已安装n个

sudo npm install -g n // -g for global installation 

升级到最新的稳定版本

sudo n stable

更改到特定版本

sudo n 10.16.0

回答这篇文章的启发。