How do I update Node.js?

2019-01-01 02:53发布

I did the following to update my npm:

npm update npm -g

But I have no idea how to update Node.js. Any suggestions? (I'm using Node.js 0.4.1 and want to update to Node.js 0.6.1.)

30条回答
不流泪的眼
2楼-- · 2019-01-01 03:13

If you want to update Node.js, just try

npm update

from your Windows cmd prompt.

Else if you want to update any specific package try

npm update <package_name>

Example:

npm update phonegap
查看更多
ら面具成の殇う
3楼-- · 2019-01-01 03:15

The easy way to update node and npm :

npm install -g npm@latest

download the latest version of node js and update /install

查看更多
一个人的天荒地老
4楼-- · 2019-01-01 03:15
  1. npm clean cache - you forget to clean ur cache
  2. npm update -g

    This works on mine Windows, I hope it will also work for you :D

查看更多
大哥的爱人
5楼-- · 2019-01-01 03:16
$ npm install -g npm stable

worked for me to update npm

查看更多
倾城一夜雪
6楼-- · 2019-01-01 03:16

In windows download the node executable file from the website and install it. this worked for me.

查看更多
不再属于我。
7楼-- · 2019-01-01 03:17

According to Nodejs Official Page, you can install&update new node version on windows using Chocolatey or Scoop

Using(Chocolatey):

cinst nodejs
# or for full install with npm
cinst nodejs.install

Using(Scoop):

scoop install nodejs

Also you can download the Windows Installer directly from the nodejs.org web site

查看更多
登录 后发表回答