Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"gatsby-source-graphql" threw an error while running the sourceNodes lifecycle: #28766

Closed
mohomedanees opened this issue Dec 27, 2020 · 3 comments
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@mohomedanees
Copy link

Hi tried running my project which is the hello world template from Gatsby when I ran npm run develop it gives the below errors.

Screenshot 2020-12-27 at 23 51 46

I'm trying to get the data from graphql plugins which I have installed in my wordpress site. The plugins are
WP GraphiQL, WP GraphQL and WPGraphQL for Advanced Custom Fields.

How can I fix this issue.

@mohomedanees mohomedanees added the type: bug An issue or pull request relating to a bug in Gatsby label Dec 27, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 27, 2020
@mohomedanees
Copy link
Author

What can be done for this to fix ?

@KyleAMathews
Copy link
Contributor

Try to verify that gatsby-source-graphql is setup correctly? Unexpected token < generally means that its HTML (or some other XML-based document) and not JSON which means that you're not correctly running GraphQL queries.

The error should be improved to show what the string looks like that couldn't be parsed.

@LekoArts
Copy link
Contributor

LekoArts commented Jan 4, 2021

Thank you for opening this!

We're marking this issue as answered and closing it for now but please feel free to comment here if you would like to continue this discussion. We also recommend heading over to our communities if you have questions that are not bug reports or feature requests. We hope we managed to help and thank you for using Gatsby!

@LekoArts LekoArts closed this as completed Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

3 participants