本文共 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
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。
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
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/