DocumentationAbout MeContact

Failed build on Gatsby Cloud

By Olivier Anguenot
Published in others
March 16, 2023
3 min read

Table Of Contents

1
Introduction
2
A quick recap
3
A closer look to the problem
4
A ray of hope
5
Lessons learned
6
Next steps
Failed build on Gatsby Cloud

(Update April, 06th)

I succeeded to migrate to the latest version of the template that embeds Gatsby v5 and the plugins needed. The site is now deployed and I hope to have retrieved all the features.


Introduction

It should have been a quiet weekend, but sometimes things happen unexpectedly: I had to overcome an issue that prevented the publication of new articles on the blog.

My new article was ready to be posted, but strangely, on Gatsby Cloud, there was an error during the build stage…

Here is some explanations on how the blog works, the problem and the solution I put in place in a hurry.

A quick recap

This blog comes from a Gatsby template that I had bought $25 just one year ago. For those who want to know, it is the FlexiBlog from ElegantStack.

I’m doing a little advertising for them because even if my subscription support was outdated, they responded to me.

Until recently (The last article was published correctly), I didn’t encounter any problems in my tooling:

  • I have a private GitHub repository where I write my articles

  • I have configured a Gatsby Cloud account to trigger a new build every time there are new commits in the main branch

The complexity comes to the fact that internally, the Gatsby template uses Lerna to mix sources the template, the themes and the content I write.

As I said, it was working fine.

Then, I changed my Mac (Not sure if it is related, but it is a strange coincidence), the next article I planned to release, got stuck due to an error during the build stage in the Gatsby Cloud.

Image: Lerna error
Image: Lerna error

From this error, I was completely stuck except that I started to discover what Lerna is.

I was not aware of the internal complexity of the Gatsby application on which I had based my blog…

That was my mistake…

A closer look to the problem

I have been trying for the last days to solve the issue.

First of all, I saw that my blog was based on Gatsby v4 and Lerna v4, which should ok not so bad for Gatsby but not good for Lerna: it is a very old version. I was even more afraid of not finding a solution.

Secondly, the problem doesn’t seem to occur in my local environment (as usual).

So what to do…

I decided to restart from the template. Fortunately, a new version of the template was available (May 2022). I used it and tried to “replicate” the blog.

A new problem appeared: Some used plugins (GTag for example) didn’t work locally anymore with the new version of the plugin (or perhaps, I didn’t take a compliant version).

So, I removed these plugins temporarily.

Sadly, after all these efforts, I still had the same problem in Gatsby.

My last chance: I tried to contact the support team and opened a ticket. But it seems that as I didn’t register for support (The Gastby Plan that includes support is very expensive: $50 per month…), I’m not sure that I will receive an answer, so I posted my problem in the community forum too…

A ray of hope

Convinced that something was wrong with the Gatsby Cloud, I tried to find an alternative solution for deploying my blog.

I remembered that Netlify also offers free hosting. So I tried to deploy my blog on that hosting.

Surprisingly, I encountered different issues. I had to delete all the plugins that were not compatible with Gatsby v4 and finally, the Netlify installation went successfully.

From there, I decided to stay on Netlify.

But that wasn’t the end of it; once deployed, I had to change the DNS settings from Gatsby to Netlify and thus change some entries in GoDaddy.

And finally the blog was back online!

Lessons learned

While Gatsby templates are promising and can be installed easily, I never spent so much time learning Gatsby.

I thought about using Gatsby like WordPress, but it’s not the same.

In the end, I learned the following lessons:

  • Choose your Gatsby template carefully: Don’t just look at the UI/UX. Consider the complexity of the toolchain, the dependencies used and the version of Gatsby and major dependencies.

  • Check the support of your template: Are updates regularly released? What is the date of the lastest updates?

  • Take the time to familiarize yourself with Gatsby and how your blog works: It could save your weekend…

  • Stay as close as possible to the latest version: Make regularly updates of your blog to avoid to do them in a hurry

Note: I finally had a good surprise when I discovered that 6 months after the last version of the template, a new version has landed with the support of Gatsby 5.0

Next steps

You may have encountered an error accessing the blog the last days (From March, 11th to March, 14th). Sorry about that. Everything should be back to normal now and I hope there will be no more interruptions in the coming days.

Don’t hesitate if you have noticed some problems in the blog. I just saw that the summary at the top of the articles disappeared. I will put it back as soon as possible.

As mentioned, the next step will be to upgrade the template (again) to the latest version published on March 11th and that includes Gatsby v5.

From there, it should be possible then to set up again the plugins previously used.

To be continued…


Tags

#blog

Share


Previous Article
Breaking changes in getStats
Olivier Anguenot

Olivier Anguenot

Your WebRTC copilot

Topics

api
dev
others

Related Posts

Time to refresh the Website!
March 30, 2022
3 min
© 2024, All Rights Reserved.
Powered By

Quick Links

HomeAbout MeContact Me

Social Media