There is a great tool called nvm that is available for Linux and OS X. It allows you to quickly install, update or switch between node.js versions.

Thanks to a lot of hard work from various open source contributors, we can now install a similar tool for Windows (with the same name), and use it to run Gatsby.

  1. First, you'll want to download and install nvm for Windows.
  2. Open the command prompt as an administrator.
  3. To install node.js, run the following (substitute 14 for another version of node.js if you like):
nvm install 14
nvm use 14

The output will look something like this:

C:\Windows\system32>nvm install 14
Downloading node.js version 14.0.0 (64-bit)...
Creating C:\Users\kylev\AppData\Roaming\nvm\temp

Downloading npm version 6.14.4... Complete
Installing npm v6.14.4...

Installation complete. If you want to use this version, type

nvm use 14.0.0

C:\Windows\system32>nvm use 14
Now using node v14.0.0 (64-bit)

4. Close the command prompt, and open a new shell, this time as your own user account. To install Gatsby, run the following:

npm install -g gatsby

5. Check that the Gatsby command line utility installed correctly:

gatsby --version

The output should look something like this:

C:\Windows\system32>gatsby --version
Gatsby CLI version: 3.3.0

Congratulations! You can now use Gatsby on Windows inside nvm to develop Gatsby static web applications.

How to Install Gatsby on Windows using Node Version Manager