Difference between NPM and NVM

前端 未结 2 529
滥情空心
滥情空心 2021-01-30 02:45

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 envi

2条回答
  •  抹茶落季
    2021-01-30 03:21

    nvm as you said is an "active" nodejs version manager. You can have multiple versions of node on the same machine and switch by doing "nvm use version". npm respects nvm if it is present on the machine, meaning if you have 0.12.7 active and do npm install -g uuid, it will install it globally under 0.12.7 but if you switch to 4.0.0, uuid will no longer be globally available.

    In any case you do not necessarily need nvm to install packages.

提交回复
热议问题