ynnoj / gatsby-source-printful

Printful store data for your Gatsby projects
https://gatsbysourceprintful.gtsb.io
MIT License
20 stars 4 forks source link

'id' undefined in gatsby-node.js #41

Closed nsmarino closed 4 years ago

nsmarino commented 4 years ago

Hello,

This is my first time submitting an issue on github so I apologize if I do not provide enough information.

After adding gatsby-source-printful to my project and adding the plugin object in gatsby-config.js, I am receiving the following error message in my terminal:

` ERROR #11330 PLUGIN "gatsby-source-printful" threw an error while running the sourceNodes lifecycle:

id is not defined

244 | const processStoreInformation = async ({ payment_card, ...store }) => ({ 245 | ...store,

246 | id: store-${id.toString}, | ^ 247 | internal: { 248 | type: PrintfulStore, 249 | contentDigest: createContentDigest(store)

Make sure that you don't have a typo somewhere and use valid arguments in sourceNodes lifecycle. Learn more about sourceNodes here: https://www.gatsbyjs.org/docs/node-apis/#sourceNodes `

I can confirm that I have successfully connected to my Printful store, as I can receive data from it on GraphiQL. I went into the file in node_modules and I am unable to figure out what variable 'id' is intended to reference in the above function. Please let me know if this is an issue that needs to be fixed, or if I have simply installed the plugin incorrectly.

Thank you for your work on this plugin and I look forward to using it.

best wishes, nicholas

github-actions[bot] commented 4 years ago

:tada: This issue has been resolved in version 2.3.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: