How can I update NodeJS and NPM to the next versions?

后端 未结 30 2140
北荒
北荒 2020-11-22 08:07

I just installed Node.js and npm (for additional modules).

How can I update Node.js and the modules which I\'m using to the latest versions

30条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-22 09:05

    For Cygwin users:

    Installing n (node version manager) in Cygwin doesn't work, instead update node with:

    wget https://nodejs.org/download/release/latest/win-x64/node.exe -OutFile 'C:\pathto\nodejs\node.exe'
    # Updating npm
    npm i -g npm
    

    Yes, you need to install wget first.

提交回复
热议问题