如何更新 Node.js?

编程入门 行业动态 更新时间:2024-10-26 11:22:57
本文介绍了如何更新 Node.js?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我做了以下更新我的 npm:

npm 更新 npm -g

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

解决方案

使用

  • 使用命令 nvm install version 例如nvm install 12.14.0 安装到机器上
  • 最后一次安装使用 nvm use version 使用较新的版本,例如nvm 使用 12.14.0
  • 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.)

    解决方案

    Use Node Version Manager (NVM)

    It's a Bash script that lets you download and manage different versions of node. Full source code is here.

    There is a separate project for nvm for Windows: github/coreybutler/nvm-windows

    Below are the full steps to use NVM for multiple version of node on windows

  • download nvm-setup.zip extract and install it.
  • execute command nvm list available from cmd or gitbash or powershell, this will list all available version of node
  • use command nvm install version e.g. nvm install 12.14.0 to install on the machine
  • last once installed use nvm use version to use newer version e.g. nvm use 12.14.0
  • 更多推荐

    如何更新 Node.js?

    本文发布于:2023-08-07 06:56:12,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1317612.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:Node   js

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!