Last active September 28, 2025 05:45
- Star (381)
You must be signed in to star a gist - Fork (97)
You must be signed in to fork a gist
-
-
Save d2s/372b5943bce17b964a79 to your computer and use it in GitHub Desktop.
Revisions
-
d2s revised this gist
Jun 11, 2020 . 1 changed file with 9 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,15 +40,18 @@ A quick guide on how to setup Node.js development environment. 4. Verify installation - To check if nvm command got installed, run: - `command -v nvm` ## Install Node.js with `nvm` 1. List installed Node.js versions with: - `nvm ls` 2. **Install latest LTS Version of [Node.js](https://nodejs.org/en/)** (for production quality applications) - `nvm install v12.18.0` 3. Install latest [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements) - `nvm install v14.4.0` 4. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications) - `nvm install v10.21.0` 5. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.18.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.18.0) (for production quality applications) - `nvm alias default v14.4.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V14.md#14.4.0) (if you use Node.js features from the Current release) - `nvm alias default v10.21.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.21.0) (if you need to use old version of Node.js for older projects) @@ -61,7 +64,7 @@ Read the Node.js [Long Term Support (LTS) schedule](https://nodejs.org/en/about/ Have a good time with the freshly installed tools. ## Migrating packages from a previous Node.js version If you already have existing Node.js version via `nvm`, you can migrate older packages from the installed Node.js versions. -
d2s revised this gist
Jun 11, 2020 . 1 changed file with 7 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,21 +42,18 @@ A quick guide on how to setup Node.js development environment. - `command -v nvm` 5. List installed Node.js versions with: - `nvm ls` 6. **Install latest LTS Version of [Node.js](https://nodejs.org/en/)** (for production quality applications) - `nvm install v12.18.0` 7. Install latest [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements) - `nvm install v14.4.0` 8. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications) - `nvm install v10.21.0` 9. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.18.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.18.0) (for production quality applications) - `nvm alias default v14.4.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V14.md#14.4.0) (if you use Node.js features from the Current release) - `nvm alias default v10.21.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.21.0) (if you need to use old version of Node.js for older projects) You can select Node.js version by running `nvm use v12.18.0` (or another version number). Another alternative: create a small Bash shell script to enable the right environment variables for your project. Read the Node.js [Long Term Support (LTS) schedule](https://nodejs.org/en/about/releases/ "Releases | Node.js") to have more understanding of their release roadmap. List of all [previous releases](https://nodejs.org/en/download/releases/ "Previous Releases | Node.js") is also useful for finding details about Node.js release history. @@ -72,12 +69,11 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Before running next commands, remember to switch to the right version of Node with `nvm use` command. For example: - `nvm use v12.18.0` - `nvm use v14.4.0` - `nvm use v10.21.0` - Linking global packages from previous version: - `nvm reinstall-packages v12.17.0` - `nvm reinstall-packages v13.14.0` - `nvm reinstall-packages v14.3.0` - `nvm reinstall-packages v10.20.1` @@ -87,7 +83,7 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - `nvm ls` - Delete an older version (if you don't use it in some of your projects): - `nvm uninstall v12.17.0` - `nvm uninstall v13.14.0` - `nvm uninstall v14.2.0` - `nvm uninstall v10.20.1` -
d2s revised this gist
Jun 11, 2020 . 1 changed file with 14 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,18 +43,18 @@ A quick guide on how to setup Node.js development environment. 5. List installed Node.js versions with: - `nvm ls` 6. Install latest LTS Version of [Node.js](https://nodejs.org/en/) (for production quality applications). - `nvm install v12.18.0` 7. Install previous major [Node.js](https://nodejs.org/en/) release (if not all of your dependencies yet support v14). - `nvm install v13.14.0` 8. Install latest [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v14.4.0` 9. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.21.0` 10. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.18.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.18.0) (for production quality applications) - `nvm alias default v13.14.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.14.0) - `nvm alias default v14.4.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V14.md#14.4.0) (if you use Node.js features from the Current release) - `nvm alias default v10.21.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.21.0) (if you need to use old version of Node.js for older projects) You can select Node.js version by running `nvm use v13.14.0` (or another version number). Another alternative: create a small Bash shell script to enable the right environment variables for your project. @@ -71,25 +71,25 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Before running next commands, remember to switch to the right version of Node with `nvm use` command. For example: - `nvm use v12.18.0` - `nvm use v13.14.0` - `nvm use v14.4.0` - `nvm use v10.21.0` - Linking global packages from previous version: - `nvm reinstall-packages v12.17.0` - `nvm reinstall-packages v13.13.0` - `nvm reinstall-packages v14.3.0` - `nvm reinstall-packages v10.20.1` ### Deleting old Node.js versions - Check installed Node.js versions with: - `nvm ls` - Delete an older version (if you don't use it in some of your projects): - `nvm uninstall v12.17.0` - `nvm uninstall v13.13.0` - `nvm uninstall v14.2.0` - `nvm uninstall v10.20.1` ### Updating outdated packages -
d2s revised this gist
May 27, 2020 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,15 +43,15 @@ A quick guide on how to setup Node.js development environment. 5. List installed Node.js versions with: - `nvm ls` 6. Install latest LTS Version of [Node.js](https://nodejs.org/en/) (for production quality applications). - `nvm install v12.17.0` 7. Install previous major [Node.js](https://nodejs.org/en/) release (if not all of your dependencies yet support v14). - `nvm install v13.14.0` 8. Install latest [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v14.3.0` 9. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.20.1` 10. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.17.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.17.0) (for production quality applications) - `nvm alias default v13.14.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.14.0) - `nvm alias default v14.3.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V14.md#14.3.0) (if you use Node.js features from the Current release) - `nvm alias default v10.20.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.20.1) (if you need to use old version of Node.js for older projects) @@ -71,12 +71,12 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Before running next commands, remember to switch to the right version of Node with `nvm use` command. For example: - `nvm use v12.17.0` - `nvm use v13.14.0` - `nvm use v14.3.0` - `nvm use v10.20.1` - Linking global packages from previous version: - `nvm reinstall-packages v12.16.3` - `nvm reinstall-packages v13.13.0` - `nvm reinstall-packages v14.2.0` - `nvm reinstall-packages v10.20.0` @@ -86,7 +86,7 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Check installed Node.js versions with: - `nvm ls` - Delete an older version (if you don't use it in some of your projects): - `nvm uninstall v12.16.3` - `nvm uninstall v13.13.0` - `nvm uninstall v14.2.0` - `nvm uninstall v10.20.0` -
d2s revised this gist
May 22, 2020 . 1 changed file with 13 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,16 +42,19 @@ A quick guide on how to setup Node.js development environment. - `command -v nvm` 5. List installed Node.js versions with: - `nvm ls` 6. Install latest LTS Version of [Node.js](https://nodejs.org/en/) (for production quality applications). - `nvm install v12.16.3` 7. Install previous major [Node.js](https://nodejs.org/en/) release (if not all of your dependencies yet support v14). - `nvm install v13.14.0` 8. Install latest [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v14.3.0` 9. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.20.1` 10. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.16.3` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.16.3) (for production quality applications) - `nvm alias default v13.14.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.14.0) - `nvm alias default v14.3.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V14.md#14.3.0) (if you use Node.js features from the Current release) - `nvm alias default v10.20.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.20.1) (if you need to use old version of Node.js for older projects) You can select Node.js version by running `nvm use v13.14.0` (or another version number). Another alternative: create a small Bash shell script to enable the right environment variables for your project. @@ -70,10 +73,12 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa For example: - `nvm use v12.16.3` - `nvm use v13.14.0` - `nvm use v14.3.0` - `nvm use v10.20.1` - Linking global packages from previous version: - `nvm reinstall-packages v12.16.2` - `nvm reinstall-packages v13.13.0` - `nvm reinstall-packages v14.2.0` - `nvm reinstall-packages v10.20.0` ### Deleting old Node.js versions @@ -83,6 +88,7 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Delete an older version (if you don't use it in some of your projects): - `nvm uninstall v12.16.2` - `nvm uninstall v13.13.0` - `nvm uninstall v14.2.0` - `nvm uninstall v10.20.0` ### Updating outdated packages -
d2s revised this gist
May 22, 2020 . 1 changed file with 11 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,17 +43,17 @@ A quick guide on how to setup Node.js development environment. 5. List installed Node.js versions with: - `nvm ls` 6. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.16.3` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.14.0` 8. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.20.1` 9. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.16.3` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.16.3) - `nvm alias default v13.14.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.14.0) (if you use Node.js features from the Current release) - `nvm alias default v10.20.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.20.1) (if you need to use old version of Node.js for older projects) You can select Node.js version by running `nvm use v13.14.0` (or another version number). Another alternative: create a small Bash shell script to enable the right environment variables for your project. Read the Node.js [Long Term Support (LTS) schedule](https://nodejs.org/en/about/releases/ "Releases | Node.js") to have more understanding of their release roadmap. List of all [previous releases](https://nodejs.org/en/download/releases/ "Previous Releases | Node.js") is also useful for finding details about Node.js release history. @@ -68,21 +68,21 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Before running next commands, remember to switch to the right version of Node with `nvm use` command. For example: - `nvm use v12.16.3` - `nvm use v13.14.0` - `nvm use v10.20.1` - Linking global packages from previous version: - `nvm reinstall-packages v12.16.2` - `nvm reinstall-packages v13.13.0` - `nvm reinstall-packages v10.20.0` ### Deleting old Node.js versions - Check installed Node.js versions with: - `nvm ls` - Delete an older version (if you don't use it in some of your projects): - `nvm uninstall v12.16.2` - `nvm uninstall v13.13.0` - `nvm uninstall v10.20.0` ### Updating outdated packages -
d2s revised this gist
Apr 20, 2020 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,17 +45,17 @@ A quick guide on how to setup Node.js development environment. 6. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.16.2` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.13.0` 8. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.20.1` 9. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.16.2` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.16.2) - `nvm alias default v13.13.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.13.0) (if you use Node.js features from the Current release) - `nvm alias default v10.20.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.20.1) (if you need to use old version of Node.js for older projects) You can select Node.js version by running `nvm use v13.13.0` (or another version number). Another alternative: create a small Bash shell script to enable the right environment variables for your project. Read the Node.js [Long Term Support (LTS) schedule](https://nodejs.org/en/about/releases/ "Releases | Node.js") to have more understanding of their release roadmap. List of all [previous releases](https://nodejs.org/en/download/releases/ "Previous Releases | Node.js") is also useful for finding details about Node.js release history. [npm](https://www.npmjs.com/) package repository has a lot of packages to discover. Have a good time with the freshly installed tools. @@ -69,21 +69,21 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Before running next commands, remember to switch to the right version of Node with `nvm use` command. For example: - `nvm use v12.16.2` - `nvm use v13.13.0` - `nvm use v10.20.1` - Linking global packages from previous version: - `nvm reinstall-packages v12.16.1` - `nvm reinstall-packages v13.12.0` - `nvm reinstall-packages v10.20.0` ### Deleting old Node.js versions - Check installed Node.js versions with: - `nvm ls` - Delete an older version (if you don't use it in some of your projects): - `nvm uninstall v12.16.1` - `nvm uninstall v13.12.0` - `nvm uninstall v10.20.0` ### Updating outdated packages -
d2s revised this gist
Apr 9, 2020 . 1 changed file with 10 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,15 +43,15 @@ A quick guide on how to setup Node.js development environment. 5. List installed Node.js versions with: - `nvm ls` 6. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.16.2` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.12.0` 8. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.20.0` 9. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.16.2` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.16.2) - `nvm alias default v13.12.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.12.0) (if you use Node.js features from the Current release) - `nvm alias default v10.20.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.20.0) (if you need to use old version of Node.js for older projects) You can select Node.js version by running `nvm use v13.9.0` (or another version number). Another alternative: create a small Bash shell script to enable the right environment variables for your project. @@ -68,22 +68,22 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Before running next commands, remember to switch to the right version of Node with `nvm use` command. For example: - `nvm use v12.16.2` - `nvm use v13.12.0` - `nvm use v10.20.0` - Linking global packages from previous version: - `nvm reinstall-packages v12.16.1` - `nvm reinstall-packages v13.9.0` - `nvm reinstall-packages v10.19.0` ### Deleting old Node.js versions - Check installed Node.js versions with: - `nvm ls` - Delete an older version (if you don't use it in some of your projects): - `nvm uninstall v12.16.1` - `nvm uninstall v13.9.0` - `nvm uninstall v10.19.0` ### Updating outdated packages -
d2s revised this gist
Mar 28, 2020 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,8 +10,8 @@ A quick guide on how to setup Node.js development environment. 1. Open new _Terminal_ window. 2. Run [nvm](https://github.com/nvm-sh/nvm) installer - … with _either_ `curl` *or* `wget`, depending on what your computer has available. - `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash` - `wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash` - The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc,` `~/.profile,` or `~/.bashrc`). (You can add the source loading line manually, if the automated install tool does not add it for you.) ```sh @@ -45,15 +45,15 @@ A quick guide on how to setup Node.js development environment. 6. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.16.1` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.12.0` 8. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.19.0` 9. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.16.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.16.1) - `nvm alias default v13.12.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.12.0) (if you use Node.js features from the Current release) - `nvm alias default v10.19.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.19.0) (if you need to use old version of Node.js for older projects) You can select Node.js version by running `nvm use v13.9.0` (or another version number). Another alternative: create a small Bash shell script to enable the right environment variables for your project. Read the Node.js [Long Term Support (LTS) schedule](https://nodejs.org/en/about/releases/ "Releases | Node.js") to have more understanding of their release roadmap. @@ -69,11 +69,11 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Before running next commands, remember to switch to the right version of Node with `nvm use` command. For example: - `nvm use v12.16.1` - `nvm use v13.12.0` - `nvm use v10.19.0` - Linking global packages from previous version: - `nvm reinstall-packages v12.16.0` - `nvm reinstall-packages v13.9.0` - `nvm reinstall-packages v10.18.1` ### Deleting old Node.js versions @@ -82,7 +82,7 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - `nvm ls` - Delete an older version (if you don't use it in some of your projects): - `nvm uninstall v12.16.0` - `nvm uninstall v13.9.0` - `nvm uninstall v10.18.1` ### Updating outdated packages -
d2s revised this gist
Feb 19, 2020 . 1 changed file with 10 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,14 +43,14 @@ A quick guide on how to setup Node.js development environment. 5. List installed Node.js versions with: - `nvm ls` 6. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.16.1` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.9.0` 8. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.19.0` 9. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.16.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.16.1) - `nvm alias default v13.9.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.9.0) (if you use Node.js features from the Current release) - `nvm alias default v10.19.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.19.0) (if you need to use old version of Node.js for older projects) You can select Node.js version by running `nvm use v13.8.0` (or another version number). Another alternative: create a small Bash shell script to enable the right environment variables for your project. @@ -68,21 +68,21 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Before running next commands, remember to switch to the right version of Node with `nvm use` command. For example: - `nvm use v12.16.1` - `nvm use v13.9.0` - `nvm use v10.19.0` - Linking global packages from previous version: - `nvm reinstall-packages v12.16.0` - `nvm reinstall-packages v13.8.0` - `nvm reinstall-packages v10.18.1` ### Deleting old Node.js versions - Check installed Node.js versions with: - `nvm ls` - Delete an older version (if you don't use it in some of your projects): - `nvm uninstall v12.16.0` - `nvm uninstall v13.8.0` - `nvm uninstall v10.18.1` ### Updating outdated packages -
d2s revised this gist
Feb 12, 2020 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,13 +43,13 @@ A quick guide on how to setup Node.js development environment. 5. List installed Node.js versions with: - `nvm ls` 6. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.16.0` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.8.0` 8. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.19.0` 9. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.16.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.16.0) - `nvm alias default v13.8.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.8.0) (if you use Node.js features from the Current release) - `nvm alias default v10.19.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.19.0) (if you need to use old version of Node.js for older projects) @@ -68,11 +68,11 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Before running next commands, remember to switch to the right version of Node with `nvm use` command. For example: - `nvm use v12.16.0` - `nvm use v13.8.0` - `nvm use v10.19.0` - Linking global packages from previous version: - `nvm reinstall-packages v12.15.0` - `nvm reinstall-packages v13.7.0` - `nvm reinstall-packages v10.18.1` @@ -81,7 +81,7 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Check installed Node.js versions with: - `nvm ls` - Delete an older version (if you don't use it in some of your projects): - `nvm uninstall v12.15.0` - `nvm uninstall v13.7.0` - `nvm uninstall v10.18.1` -
d2s revised this gist
Feb 7, 2020 . 1 changed file with 16 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,17 +43,17 @@ A quick guide on how to setup Node.js development environment. 5. List installed Node.js versions with: - `nvm ls` 6. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.15.0` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.8.0` 8. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.19.0` 9. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.15.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.15.0) - `nvm alias default v13.8.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.8.0) (if you use Node.js features from the Current release) - `nvm alias default v10.19.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.19.0) (if you need to use old version of Node.js for older projects) You can select Node.js version by running `nvm use v13.8.0` (or another version number). Another alternative: create a small Bash shell script to enable the right environment variables for your project. Read the Node.js [Long Term Support (LTS) schedule](https://nodejs.org/en/about/releases/ "Releases | Node.js") to have more understanding of their release roadmap. @@ -68,22 +68,22 @@ If you already have existing Node.js version via `nvm`, you can migrate older pa - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Before running next commands, remember to switch to the right version of Node with `nvm use` command. For example: - `nvm use v12.15.0` - `nvm use v13.8.0` - `nvm use v10.19.0` - Linking global packages from previous version: - `nvm reinstall-packages v12.14.1` - `nvm reinstall-packages v13.7.0` - `nvm reinstall-packages v10.18.1` ### Deleting old Node.js versions - Check installed Node.js versions with: - `nvm ls` - Delete an older version (if you don't use it in some of your projects): - `nvm uninstall v12.14.1` - `nvm uninstall v13.7.0` - `nvm uninstall v10.18.1` ### Updating outdated packages -
d2s revised this gist
Feb 2, 2020 . 1 changed file with 44 additions and 35 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,37 +2,25 @@ A quick guide on how to setup Node.js development environment. ## Install `nvm` for managing Node.js versions [nvm](https://github.com/nvm-sh/nvm) allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help. 1. Open new _Terminal_ window. 2. Run [nvm](https://github.com/nvm-sh/nvm) installer - … with _either_ `curl` *or* `wget`, depending on what your computer has available. - `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash` - `wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash` - The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc,` `~/.profile,` or `~/.bashrc`). (You can add the source loading line manually, if the automated install tool does not add it for you.) ```sh export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm ``` - Another option: when you have consistent directory location between systems, following example Bash/Zsh configuration allows to load `nvm` when the directory exists. This allows more consistent sharing of your shell configuration between systems, improving reliability of rest of your configuration even when nvm does not exist on a specific system. ```sh if [ -d "$HOME/.nvm" ]; then @@ -47,12 +35,12 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta fi ``` 3. If everything went well, you should now either open a new Terminal window/tab, or reload the shell configuration by running: - `source ~/.bashrc` 4. Verify installation - To check if nvm command got installed, run: - `command -v nvm` 5. List installed Node.js versions with: - `nvm ls` 6. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.14.1` @@ -62,19 +50,20 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta - `nvm install v10.18.1` 9. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.14.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.14.1) - `nvm alias default v13.7.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.7.0) (if you use Node.js features from the Current release) - `nvm alias default v10.18.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.18.1) (if you need to use old version of Node.js for older projects) You can select Node.js version by running `nvm use v13.7.0` (or another version number). Another alternative: create a small Bash shell script to enable the right environment variables for your project. Read the Node.js [Long Term Support (LTS) schedule](https://nodejs.org/en/about/releases/ "Releases | Node.js") to have more understanding of their release roadmap. [npm](https://www.npmjs.com/) package repository has a lot of packages to discover. Have a good time with the freshly installed tools. ## Migrating packages from a previous Node.js versions If you already have existing Node.js version via `nvm`, you can migrate older packages from the installed Node.js versions. - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Before running next commands, remember to switch to the right version of Node with `nvm use` command. @@ -89,34 +78,36 @@ If you already have previous version of Node.js installed with nvm, you can migr ### Deleting old Node.js versions - Check installed Node.js versions with: - `nvm ls` - Delete an older version (if you don't use it in some of your projects): - `nvm uninstall v12.14.0` - `nvm uninstall v13.5.0` - `nvm uninstall v10.18.0` ### Updating outdated packages #### List of globally installed top level packages ```sh npm ls -g --depth=0. ``` #### List outdated global packages ```sh npm outdated -g --depth=0. ``` #### Updating all globally installed npm packages ```sh npm update -g ``` #### CLI aliases for Bash & Zsh environments Example configuration for your Bash & Zsh command line environments. ```sh @@ -135,15 +126,33 @@ alias update-npm-packages="npm update -g" ``` #### Fixing old package versions If you have older npm packages with compiled native extensions, recompiling native extensions can improve compatibility with the new Node.js version. Go to your project’s root directory, and run `npm rebuild` command. ```sh cd PROJECT_NAME npm rebuild ``` ## Notes about this documentation [@d2s](https://github.com/d2s "GitHub profile of Daniel Schildt") tested older versions of these install instructions with: - [Debian 10](https://www.debian.org/News/2019/20190706) - [Ubuntu on WSL (Windows Subsystem for Linux)](https://docs.microsoft.com/en-us/windows/wsl/about) - [Ubuntu 18.04 LTS](http://releases.ubuntu.com/bionic/) - [Ubuntu 17.04](http://releases.ubuntu.com/xenial/) - [Ubuntu 16.04 LTS](http://releases.ubuntu.com/xenial/) - [Ubuntu 14.04.3 LTS](http://releases.ubuntu.com/trusty/) - [macOS 10.14.6 (Mojave)](https://apple.wikia.com/wiki/MacOS_10.14.6) - [macOS 10.13.6 (High Sierra)](https://apple.wikia.com/wiki/MacOS_10.13.6) - [macOS 10.12.6 (Sierra)](https://apple.wikia.com/wiki/MacOS_10.12.6) - [OS X 10.11.6 (El Capitan)](https://apple.wikia.com/wiki/OS_X_10.11.6) ## Contributions If you have improvement suggestions to make these instructions simpler & better, post a comment under the [original Gist by @d2s](https://gist.github.com/d2s/372b5943bce17b964a79 "Installing Node.js to Linux & macOS & WSL with nvm") with your documentation improvement suggestions. If reading a forked version of the document, check the original Gist for a more recent instructions. -
d2s revised this gist
Feb 2, 2020 . 1 changed file with 34 additions and 22 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,9 @@ # Installing Node.js with `nvm` to Linux & macOS & WSL A quick guide on how to setup Node.js development environment. Previous versions of these install instructions had been tested with: - [Debian 10 (buster)](https://www.debian.org/News/2019/20190706) - [Ubuntu on WSL (Windows Subsystem for Linux)](https://docs.microsoft.com/en-us/windows/wsl/about) - [Ubuntu 18.04 LTS (Bionic Beaver)](http://releases.ubuntu.com/bionic/) @@ -14,21 +15,25 @@ Previous versions of these install instructions had been tested with: - [macOS 10.12.6 (Sierra)](https://apple.wikia.com/wiki/MacOS_10.12.6) - [OS X 10.11.6 (El Capitan)](https://apple.wikia.com/wiki/OS_X_10.11.6) ## Install `nvm` for managing Node.js versions The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other install types is mainly in how easy it is to have multiple versions of Node.js (if needed) without too much of extra complexity. Sometimes applications might require a certain version of Node.js to work, so having the flexibility of using specific versions can save a lot of time from you. 1. Open new _Terminal_ window. 2. Run [nvm](https://github.com/nvm-sh/nvm) installer - ...with _either_ `curl` *or* `wget`, depending on what you have on your computer. - `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash` - `wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash` - The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc,` `~/.profile,` or `~/.bashrc`). (You might want/need to add the source loading line by yourself, if the automated install tool does not add it for you.) ```sh export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm ``` - If you know where the directory should be, that could be adjusted to the following so that `nvm` is only loaded if the directory exists. (Useful if you have a dotfiles repository, and want to have reusable command line configuration between different systems.) ```sh if [ -d "$HOME/.nvm" ]; then # export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" @@ -41,26 +46,29 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" fi ``` 3. If everything went well, you should now be able to reload the shell by running - `source ~/.bashrc` - (Another option is to open a new Terminal window/tab.) 4. Verify installation - To verify that nvm has been installed, do: `command -v nvm` 5. List what versions of Node are currently installed (probably none). - `nvm ls` 6. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.14.1` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.7.0` 8. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.18.1` 9. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.14.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.14.1) - `nvm alias default v13.7.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.7.0) (if you are testing compatibility with future Node.js features) - `nvm alias default v10.18.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.18.1) (if you need to use old version of Node.js for older projects) It is also possible to select what Node.js version is used per project basis, by running `nvm use v10.16.3` (or another version number) on a directory where your project's files are located. One way to do that is to create small Bash shell script for enabling the right environment variables when needed, so you would not have to remember what exact version was needed. It is also a good idea to have a look at the [Long Term Support (LTS) schedule](https://nodejs.org/en/about/releases/ "Releases | Node.js"). You can find a lot of packages from the [npm](https://www.npmjs.com/) package repository. Have a good time with the freshly installed tools. @@ -71,22 +79,22 @@ If you already have previous version of Node.js installed with nvm, you can migr - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Before running next commands, remember to switch to the right version of Node with `nvm use` command. For example: - `nvm use v12.14.1` - `nvm use v13.7.0` - `nvm use v10.18.1` - Linking global packages from previous version: - `nvm reinstall-packages v12.14.0` - `nvm reinstall-packages v13.5.0` - `nvm reinstall-packages v10.18.0` ### Deleting old Node.js versions - Look what versions are installed: - `nvm ls` - Delete an older version (if it is no longer used in some of your projects): - `nvm uninstall v12.14.0` - `nvm uninstall v13.5.0` - `nvm uninstall v10.18.0` ### Updating outdated packages @@ -134,4 +142,8 @@ After installation of Node v10.x (or similar), it can be a good idea to recompil ```sh cd PROJECT_NAME npm rebuild ``` ## Contributions If you notice some details that could be simpler & better, add a comment under the [original Gist by @d2s](https://gist.github.com/d2s/372b5943bce17b964a79 "Installing Node.js to Linux & macOS & WSL with nvm") with your documentation improvement suggestions. If you were reading an older (forked) version of this document, consider checking the original Gist in case there are more recent updates. -
d2s revised this gist
Dec 19, 2019 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -70,10 +70,10 @@ If you already have previous version of Node.js installed with nvm, you can migr - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Before running next commands, remember to switch to the right version of Node with `nvm use` command. For example: - `nvm use v12.14.0` - `nvm use v13.5.0` - `nvm use v10.18.0` - Linking global packages from previous version: - `nvm reinstall-packages v12.13.1` - `nvm reinstall-packages v13.3.0` -
d2s revised this gist
Dec 19, 2019 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -69,6 +69,11 @@ You can find a lot of packages from the [npm](https://www.npmjs.com/) package re If you already have previous version of Node.js installed with nvm, you can migrate packages from previously installed Node.js versions. - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Before running next commands, remember to switch to the right version of Node with `nvm use` command. - For example: `nvm use v12.14.0` `nvm use v13.5.0` `nvm use v10.18.0` - Linking global packages from previous version: - `nvm reinstall-packages v12.13.1` - `nvm reinstall-packages v13.3.0` -
d2s revised this gist
Dec 19, 2019 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -49,15 +49,15 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta 5. List what versions of Node are currently installed (probably none). - `nvm ls` 7. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.14.0` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.5.0` 6. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.18.0` 8. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.14.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.14.0) - `nvm alias default v13.5.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.5.0) (if you are testing compatibility with future Node.js features) - `nvm alias default v10.18.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.18.0) (if you need to use old version of Node.js for older projects) It is also possible to select what Node.js version is used per project basis, by running `nvm use v10.16.3` (or another version number) on a directory where your project's files are located. One way to do that is to create small Bash shell script for enabling the right environment variables when needed, so you would not have to remember what exact version was needed. @@ -70,18 +70,18 @@ If you already have previous version of Node.js installed with nvm, you can migr - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Linking global packages from previous version: - `nvm reinstall-packages v12.13.1` - `nvm reinstall-packages v13.3.0` - `nvm reinstall-packages v10.17.0` ### Deleting old Node.js versions - Look what versions are installed: - `nvm ls` - Delete an older version (if it is no longer used in some of your projects): - `nvm uninstall v12.13.1` - `nvm uninstall v13.3.0` - `nvm uninstall v10.17.0` ### Updating outdated packages -
d2s revised this gist
Dec 18, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,8 +21,8 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta 1. Open new Terminal window. 2. Run [nvm](https://github.com/nvm-sh/nvm) installer - ...with _either_ `curl` *or* `wget`, depending on what you have on your computer. - `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash` - `wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash` - The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc,` `~/.profile,` or `~/.bashrc`). (You might want/need to add the source loading line by yourself, if the automated install tool does not add it for you.) ```sh export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" -
d2s revised this gist
Dec 4, 2019 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,12 +51,12 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta 7. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.13.1` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.3.0` 6. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.17.0` 8. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.13.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.13.1) - `nvm alias default v13.3.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.3.0) (if you are testing compatibility with future Node.js features) - `nvm alias default v10.17.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.17.0) (if you need to use old version of Node.js for older projects) It is also possible to select what Node.js version is used per project basis, by running `nvm use v10.16.3` (or another version number) on a directory where your project's files are located. One way to do that is to create small Bash shell script for enabling the right environment variables when needed, so you would not have to remember what exact version was needed. @@ -71,7 +71,7 @@ If you already have previous version of Node.js installed with nvm, you can migr - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Linking global packages from previous version: - `nvm reinstall-packages v12.13.0` - `nvm reinstall-packages v13.2.0` - `nvm reinstall-packages v10.16.3` ### Deleting old Node.js versions @@ -80,7 +80,7 @@ If you already have previous version of Node.js installed with nvm, you can migr - `nvm ls` - Delete an older version (if it is no longer used in some of your projects): - `nvm uninstall v12.13.0` - `nvm uninstall v13.2.0` - `nvm uninstall v10.16.3` ### Updating outdated packages -
d2s revised this gist
Nov 23, 2019 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,12 +51,12 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta 7. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.13.1` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.2.0` 6. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.17.0` 8. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.13.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.13.1) - `nvm alias default v13.2.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#13.2.0) (if you are testing compatibility with future Node.js features) - `nvm alias default v10.17.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.17.0) (if you need to use old version of Node.js for older projects) It is also possible to select what Node.js version is used per project basis, by running `nvm use v10.16.3` (or another version number) on a directory where your project's files are located. One way to do that is to create small Bash shell script for enabling the right environment variables when needed, so you would not have to remember what exact version was needed. @@ -71,7 +71,7 @@ If you already have previous version of Node.js installed with nvm, you can migr - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Linking global packages from previous version: - `nvm reinstall-packages v12.13.0` - `nvm reinstall-packages v13.1.0` - `nvm reinstall-packages v10.16.3` ### Deleting old Node.js versions @@ -80,7 +80,7 @@ If you already have previous version of Node.js installed with nvm, you can migr - `nvm ls` - Delete an older version (if it is no longer used in some of your projects): - `nvm uninstall v12.13.0` - `nvm uninstall v13.1.0` - `nvm uninstall v10.16.3` ### Updating outdated packages -
d2s revised this gist
Nov 19, 2019 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -49,13 +49,13 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta 5. List what versions of Node are currently installed (probably none). - `nvm ls` 7. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.13.1` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.1.0` 6. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.17.0` 8. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.13.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.13.1) - `nvm alias default v13.1.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#2019-11-05-version-1310-current-targos) (if you are testing compatibility with future Node.js features) - `nvm alias default v10.17.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.17.0) (if you need to use old version of Node.js for older projects) @@ -70,7 +70,7 @@ If you already have previous version of Node.js installed with nvm, you can migr - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Linking global packages from previous version: - `nvm reinstall-packages v12.13.0` - `nvm reinstall-packages v13.0.1` - `nvm reinstall-packages v10.16.3` @@ -79,7 +79,7 @@ If you already have previous version of Node.js installed with nvm, you can migr - Look what versions are installed: - `nvm ls` - Delete an older version (if it is no longer used in some of your projects): - `nvm uninstall v12.13.0` - `nvm uninstall v13.0.1` - `nvm uninstall v10.16.3` -
d2s revised this gist
Nov 9, 2019 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,12 +51,12 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta 7. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.13.0` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.1.0` 6. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.17.0` 8. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.13.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.13.0) - `nvm alias default v13.1.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#2019-11-05-version-1310-current-targos) (if you are testing compatibility with future Node.js features) - `nvm alias default v10.17.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.17.0) (if you need to use old version of Node.js for older projects) It is also possible to select what Node.js version is used per project basis, by running `nvm use v10.16.3` (or another version number) on a directory where your project's files are located. One way to do that is to create small Bash shell script for enabling the right environment variables when needed, so you would not have to remember what exact version was needed. @@ -71,7 +71,7 @@ If you already have previous version of Node.js installed with nvm, you can migr - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Linking global packages from previous version: - `nvm reinstall-packages v12.12.0` - `nvm reinstall-packages v13.0.1` - `nvm reinstall-packages v10.16.3` ### Deleting old Node.js versions @@ -80,7 +80,7 @@ If you already have previous version of Node.js installed with nvm, you can migr - `nvm ls` - Delete an older version (if it is no longer used in some of your projects): - `nvm uninstall v12.12.0` - `nvm uninstall v13.0.1` - `nvm uninstall v10.16.3` ### Updating outdated packages -
d2s revised this gist
Nov 4, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,8 +21,8 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta 1. Open new Terminal window. 2. Run [nvm](https://github.com/nvm-sh/nvm) installer - ...with _either_ `curl` *or* `wget`, depending on what you have on your computer. - `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash` - `wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash` - The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc,` `~/.profile,` or `~/.bashrc`). (You might want/need to add the source loading line by yourself, if the automated install tool does not add it for you.) ```sh export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" -
d2s revised this gist
Oct 24, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,7 +51,7 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta 7. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.13.0` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.0.1` 6. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.17.0` 8. If you want to change the default Node version later, you can run a command to adjust it. -
d2s revised this gist
Oct 24, 2019 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -56,9 +56,8 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta - `nvm install v10.17.0` 8. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.13.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.13.0) - `nvm alias default v13.0.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#2019-10-23-version-1301-current-targos) (if you are testing compatibility with future Node.js features) - `nvm alias default v10.17.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.17.0) (if you need to use old version of Node.js for older projects) It is also possible to select what Node.js version is used per project basis, by running `nvm use v10.16.3` (or another version number) on a directory where your project's files are located. One way to do that is to create small Bash shell script for enabling the right environment variables when needed, so you would not have to remember what exact version was needed. @@ -72,15 +71,16 @@ If you already have previous version of Node.js installed with nvm, you can migr - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Linking global packages from previous version: - `nvm reinstall-packages v12.12.0` - `nvm reinstall-packages v13.0.0` - `nvm reinstall-packages v10.16.3` ### Deleting old Node.js versions - Look what versions are installed: - `nvm ls` - Delete an older version (if it is no longer used in some of your projects): - `nvm uninstall v12.12.0` - `nvm uninstall v13.0.0` - `nvm uninstall v10.16.3` ### Updating outdated packages -
d2s revised this gist
Oct 24, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -57,7 +57,7 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta 8. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.13.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.13.0) - `nvm alias default v10.17.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.17.0) (if you need to use old version of Node.js for older projects) - `nvm alias default v13.0.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#2019-10-23-version-1301-current-targos) (if you are testing compatibility with future Node.js features) It is also possible to select what Node.js version is used per project basis, by running `nvm use v10.16.3` (or another version number) on a directory where your project's files are located. One way to do that is to create small Bash shell script for enabling the right environment variables when needed, so you would not have to remember what exact version was needed. -
d2s revised this gist
Oct 24, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -56,7 +56,7 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta - `nvm install v10.17.0` 8. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.13.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.13.0) - `nvm alias default v10.17.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.17.0) (if you need to use old version of Node.js for older projects) - `nvm alias default v13.0.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#2019-10-23-version-1301-current-targos) -
d2s revised this gist
Oct 24, 2019 . 1 changed file with 8 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -49,14 +49,16 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta 5. List what versions of Node are currently installed (probably none). - `nvm ls` 7. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install v12.13.0` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install v13.0.0` 6. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.17.0` 8. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.13.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.13.0) - `nvm alias default v10.16.3` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.16.3) (if you need to use old version of Node.js for older projects) - `nvm alias default v13.0.1` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V13.md#2019-10-23-version-1301-current-targos) It is also possible to select what Node.js version is used per project basis, by running `nvm use v10.16.3` (or another version number) on a directory where your project's files are located. One way to do that is to create small Bash shell script for enabling the right environment variables when needed, so you would not have to remember what exact version was needed. @@ -70,15 +72,16 @@ If you already have previous version of Node.js installed with nvm, you can migr - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Linking global packages from previous version: - `nvm reinstall-packages v12.12.0` - `nvm reinstall-packages v10.16.3` - `nvm reinstall-packages v13.0.0` ### Deleting old Node.js versions - Look what versions are installed: - `nvm ls` - Delete an older version (if it is no longer used in some of your projects): - `nvm uninstall v12.12.0` - `nvm uninstall v10.16.3` ### Updating outdated packages -
d2s revised this gist
Oct 21, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -50,7 +50,7 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta - `nvm ls` 7. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install 12.13.0` 7. Install [Node.js](https://nodejs.org/en/) Current release (for testing new feature improvements). - `nvm install 12.12.0` (Note: at the moment of writing, latest LTS version is more recent than "Current" version...) 6. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.16.3` -
d2s revised this gist
Oct 21, 2019 . 1 changed file with 9 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -48,13 +48,15 @@ The reason for using [nvm](https://github.com/nvm-sh/nvm) instead of other insta - To verify that nvm has been installed, do: `command -v nvm` 5. List what versions of Node are currently installed (probably none). - `nvm ls` 7. Install latest LTS Version of [Node.js](https://nodejs.org/en/). - `nvm install 12.13.0` 7. Install Current [Node.js](https://nodejs.org/en/) Current release with latest features (for testing new feature improvements). - `nvm install 12.12.0` (Note: at the moment of writing, latest LTS version is more recent than "Current" version...) 6. Install previous LTS release of [Node.js](https://nodejs.org/en/) LTS release (if you need to run older applications). - `nvm install v10.16.3` 8. If you want to change the default Node version later, you can run a command to adjust it. - `nvm alias default v12.13.0` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.13.0) - `nvm alias default v10.16.3` [changelog](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.16.3) (if you need to use old version of Node.js for older projects) It is also possible to select what Node.js version is used per project basis, by running `nvm use v10.16.3` (or another version number) on a directory where your project's files are located. One way to do that is to create small Bash shell script for enabling the right environment variables when needed, so you would not have to remember what exact version was needed. @@ -67,16 +69,16 @@ If you already have previous version of Node.js installed with nvm, you can migr - Open new Terminal window (to make sure you have latest Node.js version active in your command line environment). - Linking global packages from previous version: - `nvm reinstall-packages v12.12.0` - `nvm reinstall-packages v10.16.2` ### Deleting old Node.js versions - Look what versions are installed: - `nvm ls` - Delete an older version (if it is no longer used in some of your projects): - `nvm uninstall v12.12.0` - `nvm uninstall v10.16.2` ### Updating outdated packages @@ -98,7 +100,6 @@ npm outdated -g --depth=0. npm update -g ``` #### Command line aliases for Bash & zsh ```sh @@ -118,8 +119,6 @@ alias update-npm-packages="npm update -g" ``` #### Fixing old package versions After installation of Node v10.x (or similar), it can be a good idea to recompile old packages (that have compiled native extensions) to make sure that they work with the new version of Node. That can be done easily by going to a project’s root directory, and running `npm rebuild`: