GrappleGQL / gatsby-source-wagtail

Plugin for sourcing Gatsby data from Wagtail CMS
17 stars 12 forks source link

Unexpected int error on preview #24

Open fabienheureux opened 3 years ago

fabienheureux commented 3 years ago

Hey, I have the following error in the console when previewing a page in gatsby develop (and it fails with the build as well)

Any idea how could I debug it ? Thanks 👍 !

image

fabienheureux commented 3 years ago

After a very quick google search 🙄: https://github.com/birkir/gatsby-source-prismic-graphql/issues/4 I am digging it right now...

fabienheureux commented 3 years ago

Well well well...I added gatsby-plugin-typescript at the top of the plugins list in gatsby-config.js, it fixed the issue. I removed it because it is built in in gatsby now, but it seems like it is added too late ? I will submit an issue to gatsby directly. Closing.

fabienheureux commented 3 years ago

Reopening because now it conflicts with this error I had in the past: https://github.com/gatsbyjs/gatsby/issues/25605

I will follow up here when I come to a solution...

fabienheureux commented 3 years ago

The issue is reproducible in this example repo: https://github.com/l-etabli/wagtail-grapple-gatsby

tbrlpld commented 3 years ago

I can reproduce the error using your example repo. I will check it out with one of my repos next.

I have also tried setting up the CORS headers and disabled the channels settings, because these were issues that I have had in the past (https://github.com/GrappleGQL/wagtail-grapple/issues/81).

tbrlpld commented 3 years ago

Ok, just checked with a repo of mine. Same issue.

IAmNatch commented 3 years ago

Still experiencing this issue, has anyone had any success getting previews back up and running?

andrew-knott commented 3 years ago

Same issue here... Help... Were you able to get a resolution to this @fabienheureux @IAmNatch

andrew-knott commented 3 years ago

I've found the issue in the example repo @fabienheureux ..

In frontend/src/templates/blog.js, replace the query with... (remove graphql)

export const query = `
  query($slug: String) {
    wagtail {
      page(slug: $slug) {
        ... on BlogPage {
          title
        }
      }
    }
  }
`