storyblok / gatsby-source-storyblok

Gatsby source plugin for building websites using the Storyblok headless CMS as a data source.
MIT License
43 stars 35 forks source link

Issue when upgrading from Gatsby 2 to 3. #49

Closed rootedbox closed 1 year ago

rootedbox commented 3 years ago

I've upgraded from Gatsby 2 to 3 but now my Gatsby-node is dying. I've switch from my code that was working to the example that you list in the readme just to make sure its not my code that needed to change.

"gatsby-source-storyblok" threw an error while running the sourceNodes lifecycle:

Cannot destructure property 'createNode' of 'boundActionCreators' as it is undefined.

   5 |
   6 | exports.sourceNodes = async function({ boundActionCreators }, options) {
>  7 |   const { createNode, setPluginStatus } = boundActionCreators;
     |           ^
   8 |   const client = new StoryblokClient(options, 'https://api.storyblok.com/v1');
   9 |
  10 |   Sync.init({

File: node_modules/gatsby-source-storyblok/gatsby-node.js:7:11
renet commented 3 years ago

Probably not an issue with Gatsby 3 in general, as it's working just fine for me.

Can you please provide some more information on how your gatsby-node.js and gatsby-config.js files look like? Also, what version of gatsby-source-storyblok are you using?