craftcms / gatsby-source-craft

Gatsby source plugin for Craft CMS.
MIT License
54 stars 13 forks source link

Cannot get it to work with Gatsby v5^ #112

Closed delasign closed 1 year ago

delasign commented 1 year ago

Description

I cannot manage to get the plugin to work with Gatsby V5.0.0^. It says that it's incompatible.

Steps to reproduce

  1. Create a new Gatsby project.
  2. Follow the instructions to setup the gatsby-source-craft.
  3. Fill in some queries
  4. Attempt to build.

Additional info

Amazon S3 | 2.0.3 Field Manager | 3.0.6 Mail Service (Custom, Non Released Plugin) | 1.0.0 Redactor | 3.0.4 Remote Sync | 4.1.1 Super Table | 3.0.9 Gatsby Helper | 2.0.1

delasign commented 1 year ago

More details:

warn Plugin gatsby-source-craft is not compatible with your gatsby version 5.11.0 - It requires gatsby@^4.0.0

"gatsby-source-craft" threw an error while running the onPluginInit lifecycle:

Schema introspection failed. First error:

45 | async function getSchema() { 46 | if (!schema) {

47 | schema = await loadSchema(execute); | ^ 48 | } 49 | return schema; 50 | }

delasign commented 1 year ago

I tried to play with the way the Token is written (removing the Authorization: (Failed) and Authorization: Bearer - it led to this.

ERROR UNKNOWN

Unable to source nodes!

ERROR #11321 API.NODE.EXECUTION

"gatsby-source-craft" threw an error while running the createSchemaCustomization lifecycle:

ENOENT: no such file or directory, scandir '.../gatsby/delasign/node_ modules/gatsby-source-craft/.cache/internal-craft-fragments'

Error: ENOENT: no such file or directory, scandir '.../gatsby/delasign/node_modules/gatsby-source-craft/.cache/inter nal-craft-fragments'

success createSchemaCustomization - 0.027s

ERROR UNKNOWN

Unable to source nodes!

ERROR #11321 API.NODE.EXECUTION

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

ENOENT: no such file or directory, scandir '.../gatsby/delasign/node_ modules/gatsby-source-craft/.cache/internal-craft-fragments'

Error: ENOENT: no such file or directory, scandir '.../gatsby/delasign/node_modules/gatsby-source-craft/.cache/inter nal-craft-fragments'

warn The gatsby-source-craft plugin has generated no Gatsby nodes. Do you need it? This could also suggest the plugin is misconfigured.

brianjhanson commented 1 year ago

Sorry @delasign the Gatsby source plugin does not currently support Gastby 5.0. 4.X versions of Gatsby should work though.

delasign commented 1 year ago

@brianjhanson I just downgraded to Gatsby v4.20.0 and tried again and I am having the exact same problems.

delasign commented 1 year ago

Got it working on v5.11 of Gatsby. Tutorial coming on how to coming soon.

delasign commented 1 year ago

https://delasign.com/blog/gatsby-craft-cms-source-plugin

westsidetechsolutions commented 1 year ago

Will we get support for Gatsby 5 on this project?