After installing nvm, you need to install the version of Node.js we will use in this book: version 8.11.1. To install it, run this command:
nvm install 8.11.1
If you didn't have Node.js or nvm previously installed, it will automatically set this to your default Node.js installation, so the output of this command should be v8.11.1:
node --version
If you have existing Node.js versions installed, you can either use v8.11.1 as a default, or ensure that you run this command to use v8.11.1 when working through the examples in this book:
nvm use 8.11.1
You can create a file named .nvmrc in the folder with your code and populate it with the contents v8.11.1. You can run nvm use within this directory and it will set the version to 8.11.1 without having to specify it.