I’m using
Gatsby-Image 2.2.23
gatsby-source-datocms 2.1.15
The GraphQL query from /Users/wildpow/Documents/GitHub/new-esc-gatsby/src/pages/index.js failed.
Errors:
Cannot find module 'gatsby-plugin-sharp'
Readme is not clear that I need this plug-in. So I installed it and added it to my gatsby-config.js.
Now the error is
success open and validate gatsby-configs - 0.038 s
â ‹ load plugins
(sharp:19554): GLib-GObject-WARNING **: 10:32:27.132: cannot register existing type 'VipsObject'
(sharp:19554): GLib-CRITICAL **: 10:32:27.133: g_once_init_leave: assertion 'result != 0' failed
(sharp:19554): GLib-GObject-CRITICAL **: 10:32:27.133: g_type_register_static: assertion 'parent_type > 0' failed
(sharp:19554): GLib-CRITICAL **: 10:32:27.133: g_once_init_leave: assertion 'result != 0' failed
Well I upgraded these packages and the error went away !?!
gatsby from 2.13.72 --> 2.15.28
react 16.9.0 --> 16.10.1
react-dom 16.9.0 --> 16.10.1
Wasn’t the updates that did it. gatsby-plugin-sharp
needs to be listed as a dependency in your project for the _tracedSVG
fragments to work. PR #80 to update README.
Are you on Ubuntu?
Try doing this, it fixed that issue for me:
Get the latest release here: https://github.com/libvips/libvips and build it.
Then I had to follow these steps to make it work: https://github.com/lovell/sharp/issues/327#issuecomment-167094002
I’m using a Mac. My problem, I believe, was a documentation issue. I was unaware I needed gatsby-plug-sharp
listed as a dependency to use the _tracedSVG
fragment, that’s is why I made the PR #80 to update the docs for anyone else that may run into the same issue.