njosefbeck / gatsby-source-stripe

Gatsby source plugin for building websites using Stripe as a data source
74 stars 17 forks source link

[HELP WANTED] - GatsbyV4 [bug] - error while running the sourceNodes lifecycle #69

Closed jodiedoubleday closed 2 years ago

jodiedoubleday commented 2 years ago

Prerequisites

[ X ] Put an X between the brackets on this line if you have done all of the following:

Describe the bug A clear and concise description of what the bug is. I've updated to GtsabyV4 - When running my site i get the following error

"gatsby-source-stripe" threw an error while running the sourceNodes lifecycle:
Cannot read property 'type' of undefined
TypeError: Cannot read property 'type' of undefined

This is not necessarily a BUG but maybe a request to update to support Gatsby V4.

To Reproduce Steps to reproduce the behavior:

  1. Update all packages to the latest Gatsby V4
  2. Run Gatsby in Develop or on Serve.
  3. error appears, and does not allow Stripe Graphwl to be generated

Expected behavior Everything to run smoothly and all Stripe Graphql data to appear.

Screenshots

Screenshot 2021-11-01 at 16 50 22

Versions (please complete the following information):

os: macOS Big Sur 11.6 node: v14.17.3 npm: 6.14.13 gatsby: 4.0.2 gatsby-source-stripe: 3.2.2

Gatsby config:

Copy the portion of your Gatsby config for this plugin here. Do not include your secretKey.

{
      resolve: `gatsby-source-stripe`,
      options: {
        objects: ['Price'],
        secretKey: ...,
        downloadFiles: true
      }
    },
njosefbeck commented 2 years ago

Hello! Yes this is likely due to Gatsby v4 updates. I haven't used Gatsby in a long time, so if you or anyone else would like to contribute to updating this project to work with v4, it would be much appreciated. Otherwise it may take me a little bit to get around to this unfortunately.

jodiedoubleday commented 2 years ago

I'm not the best with gatsby plugins myself but I'll give it a damn good try 😄