Developing inside a virtual machine segregates the clutter of software and setting required for software development, keeping the host machine cleaner and faster, preventing develoipment software or code from accidentally breaking the Windows, and enables the environment to be quickly replaced or restored.

Although there are many options I've decided to use Hyper-V as a hardware virtualisation platofrm as it's included with Window 10 Pro. If another option becomes more appropriate later I might make the switch as required.

Ubuntu is the most popular Linux distrobution, the Long Term Support version with its longer support cycle offereing a more stable platform for development. This is why Ubuntu LTS generally has better software availability compared to other releases or distrobutions, making it a better platform for development.

Normally Node.js installed using root permissions, typically a sudo user. Node.js development is normally done using user permissions. This can create issues with permissions when working with Node.js projects. Node Version Manager get around this by installing Node.js with user permissions, making it easier to develop applications. NVM is part of the recommended development environment for Gatsby JS, but it does help with other Node.js projects.

Below is an abbrieviated Gatsby JS install procedure for Ubtunu LTS.


# Update package lists and upgrade updated packages
sudo apt update && sudo apt -y upgrade
# Install cURL to enable download and installation of NVM
sudo apt-get install curl
# Download and run the NVM install script
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
# Install Node.js version 10 using NVM
nvm install 10

NVM can maintain multiple Node.js versions, so needs to be instructed which one to use before proceeding.

# Specifiy NVM to use Node.js version 10 by default
nvm use 10

Git is a Gatbsy JS dependency that is required so it can download and prepare Starter templates. It's also required to maintain public and private repositories when developing applications.

# Install Git
sudo apt install git
# Install Gatsby JS globally
npm install -g gatsby-cli

Copyright Chad Tomlinson. All rights reserved.