NPM 和 NVM 的区别 [英] Difference between NPM and NVM
问题描述
我知道 npm 是包管理器,nvm 是节点版本管理器.我目前正在尝试使用 Bash 自动安装我的开发和生产环境,但忘记了我是如何开始以及以什么顺序开始的.安装npm后,发现我们的nvm没有安装.
I know npm is the package manager and nvm is the node version manager. I am currently trying to auto-install my development and production environment using Bash and forgot how I started out and in what order. After installing npm, I found our nvm was not installed.
我还需要安装 nvm 吗?如果是这样,有什么好处?
Do I still need to install nvm? If so, what is the benefit?
推荐答案
nvm
(Node Version Manager) 是一个可以让你下载和安装 Node.js 的工具.检查您是否通过 nvm --version
安装了它.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
npm
(节点包管理器)是一个允许你安装javascript的工具包.检查您是否通过 npm --version
安装了它.
npm
随 Node.js 一起提供,因此如果您安装了节点 (node --version
),您很可能也安装了 npm
.
npm
comes with Node.js so if you have node installed (node --version
) you most likely have npm
installed as well.
除非您想在系统上安装多个版本的 Node.js,或者您想升级当前版本,否则您不需要 nvm
.
You don't need nvm
unless you you want to keep multiple versions of Node.js installed on your system or if you'd like to upgrade your current version.
这篇关于NPM 和 NVM 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!