博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
node.js更新_如何更新Node.js
阅读量:2504 次
发布时间:2019-05-11

本文共 1985 字,大约阅读时间需要 6 分钟。

node.js更新

Node.js can be installed in multiple ways on a system, and the upgrade instructions depend on how you first installed it.

Node.js可以通过多种方式安装在系统上,升级说明取决于您首次安装它的方式。

如果您使用官方软件包安装了Node (If you installed Node using the official package)

The easiest way to install Node is to download the official package from the .

安装Node的最简单方法是从下载官方软件包。

Node website

The official package contains an installer that will detect the existing version of Node.js and it will overwrite it with the new one.

官方软件包包含一个安装程序,它将检测Node.js的现有版本,并将用新版本覆盖它。

如果您使用Homebres安装了Node(在macOS上) (If you installed Node using Homebres (on macOS))

Homebrew is a very popular way to install Node.js on a Mac.

Homebrew是在Mac上安装Node.js的一种非常流行的方法。

If you did use Homebrew, upgrading Node is as simple as running

如果您确实使用Homebrew,则升级Node就像运行一样简单

brew update #makes sure Homebrew is up to datebrew upgrade node

Homebrew might ask you to upgrade your xCode version to compile the package.

Homebrew可能会要求您升级xCode版本以编译该软件包。

如果您使用nvm (If you use nvm)

nvm is a popular way to run Node. It allows you to easily switch the Node version, and install new versions to try and easily rollback if something breaks, for example.

nvm是运行Node的流行方法。 例如,它使您可以轻松切换Node版本,并安装新版本以尝试并轻松回滚。

It is also very useful to test your code with old Node versions.

使用旧的Node版本测试代码也非常有用。

When you use nvm, you can check the current version you are running by typing nvm current, which will give you the same result as node -v.

使用nvm ,可以通过键入nvm current来检查正在运行的当前版本,这将为您提供与node -v相同的结果。

To list all the installed versions, run nvm ls.

要列出所有已安装的版本,请运行nvm ls

You can install a new Node release (or any old Node release, too) using nvm install <VERSION>, for example:

您可以使用nvm install <VERSION>安装新的Node版本(或任何旧的Node版本),例如:

nvm install 10.8.3

Once installed, you can set that Node.js version to be the one to use by typing

安装完成后,您可以通过键入以下内容将Node.js版本设置为要使用的版本。

nvm use 10.8.3

This will set 10.8.3 to the default Node version, system-wide.

这会将10.8.3设置为系统范围内的默认Node版本。

翻译自:

node.js更新

转载地址:http://yxqgb.baihongyu.com/

你可能感兴趣的文章
CentOS7 中把yum源更换成163源
查看>>
关于yum Error: Cannot retrieve repository metadata (repomd.xml) for repository:xxxxxx.
查看>>
2020-11-18
查看>>
Docker面试题(二)
查看>>
【NOI 2018】归程(Kruskal重构树)
查看>>
注册用户
查看>>
TZC Intercommunication System
查看>>
HDU 4571 SPFA+DP
查看>>
centos 创建以日期为名的文件夹
查看>>
Java Timer触发定时器
查看>>
Page Object设计模式
查看>>
程序的基础知识
查看>>
在VIM中使用GDB调试 – 使用vimgdb
查看>>
python爬虫---从零开始(五)pyQuery库
查看>>
POJ2236(KB5-A)
查看>>
Centos MySQL数据库迁移详细步骤
查看>>
2初出茅庐--初级篇2.1
查看>>
新建 WinCE7.0 下的 Silverlight 工程
查看>>
腾讯的张小龙是一个怎样的人?
查看>>
jxl写入excel实现数据导出功能
查看>>