From 7dcfac9dc6f177df524f70fe5be986bb92654860 Mon Sep 17 00:00:00 2001 From: Paul Isaris Date: Sat, 13 Oct 2018 21:36:06 +0300 Subject: [PATCH] Added more instructions for nvm and code example (#18357) --- .../guide/english/developer-tools/npm-cheatsheet/index.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/src/pages/guide/english/developer-tools/npm-cheatsheet/index.md b/client/src/pages/guide/english/developer-tools/npm-cheatsheet/index.md index b86d6990af..44a8283a0f 100644 --- a/client/src/pages/guide/english/developer-tools/npm-cheatsheet/index.md +++ b/client/src/pages/guide/english/developer-tools/npm-cheatsheet/index.md @@ -85,6 +85,8 @@ npm list # for local packages ## Node Version Manager `nvm` +nvm is a popular version manager for npm. It lets you install multiple npm instances on the same machine, giving you the opportunity to also have different versions for global packages, for each npm installation. You can find [more information on nvm here](https://github.com/creationix/nvm). + Say you want to install Node v6.9.1 you would write on the terminal: ```shell @@ -97,6 +99,12 @@ If you have multiple versions of Node.js installed on your workspace, you can sw nvm use 4.8.4 ``` +If you want to install another version of Node.js and also re-install all global packages from another installed version: + +```shell +nvm install 8.11.1 --reinstall-packages-from=4.8.4 +``` + ### Making a node version default. In order to set a default version of node for your workspace, just type: