Incorrectly Executing Gatsby Development Server

Running a static web generator development server but encountering problems with execution?

Incorrectly Executing Gatsby Development Server

When I was setting up a development environment for creating the this website using the static website generator Gatsby (before I decided to switch to Hugo), I was struggling to run the built-in development server.

At one point, I tried re-installing Gatsby and created a site in my home directory on my Ubuntu PC. The development server loaded just fine and I was able to get the site running! Then I tried creating it on my larger capacity hard drive that is backed up to my local Nextcloud server, it would not run correctly.

Then I recalled that programs cannot execute on disks in your system in Linux if the “exec” option is not set in /etc/fstab configuration file. On a default installation of Ubuntu, any disk that does not contain the operating system defaults to non-exec mode. I imagine this is the default option to help improve security since it prevents applications/scripts from execute on other disks. Sure enough, once I set this option in the /etc/fstab configuration file, I was able to run the Gatsby site on my other disk! It was a simple oversight that caused a few wasted hours of troubleshooting.

If you are having a similar issue with running Gatsby or another script/program on a secondary disk, I hope that I was able to save you some troubleshooting time!