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

后端 未结 30 1652
北荒
北荒 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 08:51

    First update npm,

    npm install -g npm@next

    Then update node to the next version,

    npm install -g node@next or npm install -g n@next or, to the latest,

    npm install -g node@latest or npm install -g node

    check after version installation,

    node --versionor node -v

提交回复
热议问题