博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux安装nvm_如何使用NVM在MacOS,Linux或Windows计算机上安装节点
阅读量:2521 次
发布时间:2019-05-11

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

linux安装nvm

Before you can start making super awesome apps in NodeJS, you have to install it. Fortunately, installing NodeJS is super simple.

您必须先安装它,然后才能开始在NodeJS中制作超赞的应用程序。 幸运的是,安装NodeJS非常简单。

In this tutorial we will cover how to install NodeJS/NPM in

在本教程中,我们将介绍如何在以下位置安装NodeJS / NPM

  • macOS/linux

    macOS / Linux
  • Windows

    视窗

Once you install NodeJS/NPM, you can easily upgrade/downgrade to any Node version with one command. The following video tutorial shows you how to download NodeJS on your machine.

安装NodeJS / NPM后,您可以使用一个命令轻松地将其升级/降级到任何Node版本。 以下视频教程向您展示如何在计算机上下载NodeJS。

Mac OS和Linux的安装指南 (Installation guide for Mac OS & Linux)

Open a new terminal. Type the following and hit enter:

打开一个新的终端。 输入以下内容,然后按Enter键:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

Close your terminal, then open a new one and type this:

关闭您的终端,然后打开一个新终端并输入以下内容:

nvm ls

You will see something like this:

您将看到如下内容:

systemiojs -> N/A (default)node -> stable (-> N/A) (default)unstable -> N/A (default)nvm_list_aliases:36: no matches found: /Users/adeelimran/.nvm/alias/lts/*

Next in your terminal type:

终端类型中的下一个:

nvm install 12.18.1

Once it is installed, it is ready to be used. To use this version, just type this in your terminal:

一旦安装,就可以使用了。 要使用此版本,只需在终端中输入以下内容:

nvm use 12.18.1

Now that it is installed let's check it by doing the following:

现在已经安装了它,让我们通过以下操作进行检查:

And that is it – you are done. Have fun.

就是这样–您完成了。 玩得开心。

Now if, in the future, for some reason you want to uninstall NVM (node version manager) simply open up your terminal and type the following:

现在,如果将来出于某种原因要卸载NVM(节点版本管理器),只需打开终端并输入以下内容:

rm -rf $NVM_DIR ~/.npm ~/.bower

Windows安装指南 (Installation guide for Windows)

First, go to nvm-windows repositories releases section . Select the latest release.

首先,转到nvm-windows存储库发布部分 。 选择最新版本。

Next choose the nvm-setup.zip file and download it.

接下来,选择nvm-setup.zip文件并下载。

Once the file is downloaded, unzip and click on the installer and follow the steps. (I am using for .zip file extraction, because it is FREE.)

下载文件后,解压缩并单击安装程序,然后执行以下步骤。 (我使用提取.zip文件,因为它是免费的。)

Then to check if nvm is properly installed, open a new command prompt terminal and type nvm. Once it is verified that it is installed you can move on to the next step.

然后,要检查nvm是否已正确安装,请打开新的命令提示符终端,然后键入nvm 。 确认已安装后,即可继续进行下一步。

Install NodeJS using nvm like this:

使用nvm安装nvm如下所示:

nvm install 
// let's assume it's 12.18.1

The version can be a NodeJS version or "latest" (for the latest stable version).

该版本可以是NodeJS版本或“最新”(用于最新的稳定版本)。

In order to use the specific node version you just installed, in your terminal simply type the following:

为了使用您刚安装的特定节点版本,只需在终端中键入以下内容:

nvm use 12.18.1;

Check the node version with node -v. This should output v12.18.1 in your terminal.

使用节点-v检查节点版本。 这应该在您的终端中输出v12.18.1。

If you want to install another version of Node, repeat the steps with a different version.

如果要安装其他版本的Node,请使用其他版本重复这些步骤。

You should now have a working version of NodeJS running on your machine. Happy coding folks. :)

现在,您应该在计算机上运行一个工作版本的NodeJS。 快乐的编码人员。 :)

Let me know if you found this guide helpful. Drop me a message on ().

如果您发现本指南对您有帮助,请告诉我。 在 ( )上给我留言。

翻译自:

linux安装nvm

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

你可能感兴趣的文章
一道关于员工与部门查询的SQL笔试题
查看>>
Canvas基础
查看>>
[Hive - LanguageManual] Alter Table/Partition/Column
查看>>
可持久化数组
查看>>
去除IDEA报黄色/灰色的重复代码的下划波浪线
查看>>
Linux发送qq、网易邮件服务配置
查看>>
几道面试题
查看>>
【转】使用 WebGL 进行 3D 开发,第 1 部分: WebGL 简介
查看>>
js用正则表达式控制价格输入
查看>>
chromium浏览器开发系列第三篇:chromium源码目录结构
查看>>
java开发操作系统内核:由实模式进入保护模式之32位寻址
查看>>
第五讲:单例模式
查看>>
Python编程语言的起源
查看>>
Azure ARMTemplate模板,VM扩展命令
查看>>
(转)arguments.callee移除AS3匿名函数的侦听
查看>>
onNewIntent调用时机
查看>>
MYSQL GTID使用运维介绍(转)
查看>>
04代理,迭代器
查看>>
解决Nginx+PHP-FPM出现502(Bad Gateway)错误问题
查看>>
Java 虚拟机:互斥同步、锁优化及synchronized和volatile
查看>>