我做了以下事情来更新我的npm:

npm update npm -g

但是我不知道如何更新Node.js。有什么建议吗?(我使用Node.js 0.4.1,想更新到Node.js 0.6.1。)


当前回答

简短的回答:

进入该页面:下载| Node.js

下载您平台的安装程序,然后安装它。

其他回答

windows操作系统请从网站下载节点可执行文件进行安装。这对我很管用。

只需将新版本安装到当前文件夹。我从v4升级了我的。Windows版本为v6.10。

你可以在Windows上使用Chocolatey。它非常易于使用,也有助于保持您与其他应用程序的更新。

此外,您可以从https://nodejs.org下载最新版本并安装它。

Ubuntu的:

sudo apt-get install -y curl
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get install -y nodejs

来源:https://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version

安装nvm(卷) $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash 或与Wget $ wget - qo - https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash 显示已安装版本列表 $ NVM ls 显示可安装的版本列表 $ NVM ls-remote 安装您喜欢的版本 $ NVM安装v7.5.0 将此版本设置为默认版本 $ NVM别名默认v7.5.0