Skip to content
Permalink
Browse files
added more notes on nvm
  • Loading branch information
aa7401 committed Jul 2, 2017
1 parent 1f402a4 commit 706d451c9244ea73421ac07740bcacebe1aa77fa
Showing 1 changed file with 26 additions and 0 deletions.
@@ -96,6 +96,32 @@ $ node -v
v8.1.0
```

Over time you will update the version of NodeJS and, as a result will end up with multiple versions installed on your computer. You can check which version are currently install using.
```
$ nvm ls
v5.1.0
-> v7.3.0
v8.1.2
system
default -> 8.1.2 (-> v8.1.2)
node -> stable (-> v8.1.2) (default)
stable -> 8.1 (-> v8.1.2) (default)
iojs -> N/A (default)
```
As you can see there are three versions of nodejs installed and the one currently in use is v7.3.0.We can switch to a different version with `nvm use 5.1.0` for example. In the example above we are using v7.3.0 with the default is set to 8.1.2. The default version can be set using.
```
$ nvm alias default 8.1.2
```
If we no longer need one of the installed versions it can be removed.
```
$ nvm uninstall 5.1.0
Uninstalled node v5.1.0
```
When you update your node version you will also need to update any packages to run under the new version.
```
$ nvm reinstall-packages 8.1.2
```

## Installing a Code Editor

There are plenty of choices when it comes to editors. The examples in this book will use the [Visual Studio Code](https://code.visualstudio.com) editor which is available for all major platforms. If you are looking at other editors then choose one that supports JavaScript and plugins.

0 comments on commit 706d451

Please sign in to comment.