ldd / gatsby-source-github-api

Pull data into Gatsby from Github API v4
MIT License
65 stars 10 forks source link

Breaks on Gatsby v3 because npm package needs published with new version #28

Closed Vincent440 closed 3 years ago

Vincent440 commented 3 years ago

Hey there, it looks like this may have already been fixed but just needs to be published to npm

currently the only available version on npm is "version": "0.2.1"

here is the CLI output I get after updating from gatsby v2.x to 3.2.1

 ERROR #11321  PLUGIN

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

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

   8 | ) => {
   9 |   console.log(boundActionCreators)
> 10 |   const { createNode } = boundActionCreators;
     |           ^
  11 |   return new Promise((resolve, reject) => {
  12 |     // we need a token to use this plugin
  13 |     if (token === undefined) {

File: node_modules\gatsby-source-github-api\gatsby-node.js:10:11

I took the updated code available on GitHub and dropped it in my node_modules\gatsby-source-github-api\gatsby-node.js file and it works fine again. So thanks for whoever got that updated already, but the package on npm needs to get those updates

Any thoughts on bumping the version to "version": "1.0.1" to allow for major upgrade without breaking the package for gatsby v2 users?

Vincent440 commented 3 years ago

Thank you for your work.

I created a PR to fix this issue, #29

I appreciate this open source package and how easy it was to get working.

ldd commented 3 years ago

Fixed and published to NPM as of 5 minutes ago. Sorry for taking so long, but I was busy running a (successful) Kickstarter