Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gatsby project giving strange errors and is unable to build

Tags:

gatsby

I npm install --save gatsby-transformer-sharp gatsby-plugin-sharp and then after doing so I'm unable to run my project and I'm getting these strange errors:

(sharp:7804): GLib-GObject-WARNING **: 14:10:08.042: cannot register existing type 'VipsObject'

(sharp:7804): GLib-CRITICAL **: 14:10:08.043: g_once_init_leave: assertion 'result != 0' failed

(sharp:7804): GLib-GObject-CRITICAL **: 14:10:08.043: g_type_register_static: assertion 'parent_type > 0' failed

(sharp:7804): GLib-CRITICAL **: 14:10:08.043: g_once_init_leave: assertion 'result != 0' failed
like image 847
DGB Avatar asked Aug 22 '19 06:08

DGB


People also ask

What is Gatsby problem?

Gatsby's tragic flaw is his inability to wake up from his dream of the past and accept reality. His obsession with recapturing his past relationship with Daisy compels him to a life of crime and deceit.

How do I update my plugins for Gatsby?

Update Gatsby related packagesUpdate your package. json to use the latest version of Gatsby related packages. You should upgrade any package name that starts with gatsby-* . Note, this only applies to plugins managed in the gatsbyjs/gatsby repository.

What happens on Gatsby build?

Understanding gatsby build (build time) gatsby build creates a version of your site with production-ready optimizations like packaging up your site's config, data, and code, and creating all the static HTML pages that eventually get rehydrated into a React application.

What is helmet in Gatsby?

React Helmet is a component which lets you control your document head using their React component. With this plugin, attributes you add in their component, e.g. title, meta attributes, etc. will get added to the static HTML pages Gatsby builds.


2 Answers

The error is caused by : gatsby-plugin-favicon , sharp was not updated on it, for now just uninstall it.

like image 146
sidali Avatar answered Oct 27 '22 12:10

sidali


I was experiencing the same issue (working with Yarn, not npm). It seems the wrong version of some binary was cached somewhere.

What fixed the issue for me was running yarn cache clean, removing the entire node_modules and installing all dependencies again.

like image 2
gvdp Avatar answered Oct 27 '22 12:10

gvdp