How to Install Gatsby.js Node Framework on Ubuntu Linux

|

|

The article provides a detailed guide on how to install and use the Gatsby.js framework on Ubuntu Linux. Gatsby.js is a fast, secure, React-based, open-source framework used for building robust apps and websites while integrating various content, APIs, and services. It also supports building headless CMS with templates for platforms like WordPress, Shopify, and Drupal.…

This article describes the steps to install and use the Gatsby.js framework on Ubuntu Linux.

Gatsby lets you build fast, secure, robust apps and websites using its React-based, open-source framework. As a result, you can integrate different content, APIs, and services seamlessly into one web experience in real-time.

Not only can Gatsby help you create power apps, it also provides a starter pack and templates for building headless CMS with support for WordPress, Contentful, Drupal, Shopify, Strapi, Ghost, and more.

Below is how to install Gatsby.js on Ubuntu Linux.

How to install Gatsby.js Node framework on Ubuntu Linux

As described above, Gatsby lets you build fast, secure, and robust apps and websites using its React-based, open-source framework. You can seamlessly integrate different content, APIs, and services into one real-time web experience.

Below is how to install it on Ubuntu Linux.

Install NVM (Node Version Manager) and Node.js

Gatsby.js is a JavaScript framework written in Node.js. Therefore, to install and use it, you must have nvm and Node.js installed.

Run the commands below to install curl, which allows you to transfer data and download additional dependencies.

sudo apt update
sudo apt install curl

After it finishes installing, download the latest nvm version:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

Once nvm is installed, run the commands below to source the ~/.bashrc file and reload your current bash shell session.

source ~/.bashrc

Next, run the commands below to install Node.js version 16.

nvm install 16
nvm use 16

Gatsby CLI

You are now ready to install Gatsby CLI. The Gatsby command line interface (CLI) is a tool that lets you quickly create new Gatsby-powered sites and run commands for developing Gatsby sites.

Run the commands below to install it.

npm -g install gatsby-cli

Run the commands below to find out what version of Gatsby CLI is installed.

gatsby --version

Create Gatsby app

Now that Gatsby is installed, create your first Gatsby app by running the commands below.

gatsby new

At the prompt, answer and complete the following details:

What would you like to call your site?

✔ · myapp
What would you like to name the folder where your site will be created?
✔ richard/ myapp
✔ Will you be using JavaScript or TypeScript?
· JavaScript
✔ Will you be using a CMS?
· No (or I'll add it later)
✔ Would you like to install a styling system?
Thanks! Here's what we'll now do:
🛠 Create a new Gatsby site in the folder myapp
✔ Created site from template
✔ Installed Gatsby
✔ Installed plugins
✔ Created site in myapp

Access your app

After creating the apps, change them into the project folder and start it up.

cd myapp/
gatsby develop -H 127.0.0.1

You should then open your browser and browse to the server’s hostname or IP address, followed by port number 8000.

http://127.0.0.1:8000
install gatsby on ubuntu linux portal
Install Gatsby on the Ubuntu Linux portal

That should do it!

Conclusion:

This post showed you how to install Gatsby.js on Ubuntu Linux. Please use the comment form below if you find any errors above or have something to add.

Like this:



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.