-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
ERROR #85901 GRAPHQL | gatsby-source-contentful requires Media uploaded to work #15397
Comments
It's possible that you don't have any data for type |
I've got the same issue here
Can someone give me more information about it how I can fix this. I don't really get your response @freiksenet can you maybe explain it a bit further to me.. I'm just to dump to get it right now :( |
@jingxuan98 @andrew-secret as temporary workaround, please add dummy image to contentful space. In #15344 (comment) one user said it works then. |
@pieh thanks I'll try it out and let you know if it worked out 👍 |
@jingxuan98 @pieh I can confirm that it worked for me too... thank u soo much 💯 |
@jingxuan98 @pieh confirmed. Uploading an image to "Media" resolved errors. Thanks! |
Thanks guys! |
I don't have any media type in my content model. Is there any way to fix this without adding it? |
It worked for me too! Thanks @pieh |
I have the same error and I deleted all the content of the file: node_modules/gatsby-source-contentful/src/fragments.js and it's working. |
This worked for me as well! |
is this just going to be closed and not fixed? i dont think a workaround is considered a fix |
Agree with @ryudice. Adding dummy data to my contentful space isn't an option. Just curious. I've used this package before without this issue. Anyone know how or when this bug was introduced? |
add dummy image also work for me |
I'm reopening this issue as adding dummy data workaround isn't a fix. I ran into the issue because i wanted to add It's especially frustrating because people that clone down an OSS (or any) the project now need to create contentful space and addd an image just because |
Tried what @maximechofflet mentioned and it worked, though it would randomly automatically break the app after 10 minutes. |
Its worked for me, thank |
Fixed by #12816 Please use the workarounds mentioned here or in the PR. |
@pieh thank you! If anyone was wondering what they meant by "adding dummy image there", follow these steps:
I have so many questions, but already wasted enough time on this to try to understand why that matters. |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
This has helped fix the issue temporarily. Thank you so much! |
Not sure if this will work for others but I ran |
weird issue around gatsby-source-contentful needing an img saved in media in order to work gatsbyjs/gatsby#15397
* created: index.js as landingpage created: AuthPage.js w/ initial sign in component * added: TestPage / StudyPage / AuthPage / HomePage with initial layouts and styling structure * added: GraphQL query to siteMetadata in getaby-config.js to render the app subTitle on the index.js page * using GraphQL to access markdown data * added: initial connection to Contentful CMS weird issue around gatsby-source-contentful needing an img saved in media in order to work gatsbyjs/gatsby#15397 * debug: structure of <HomePage /> & GraphQL Query <HomePage /> is now dynamically rendering the <StudySetOption /> cards for each studySet recieved from the GraphQL query * Refactored: <SidebarLayout /> component now accepts type prop component is dyncamically rendering JSX for appropraite type deleated individual component implementations of the SidebarLayout * Updated: <StudySetOption /> styled updated to be rendering a stack of cards * updated: <SidebarLayout /> css * initial commit: auth branch * step: initial app.js routing and rendering appropraite data * Updated: Project file structure broke Views our of Pages * authReset // STUCK: cant resolve service worker look into implementation of auth0 & gatsby without a typical react src/index.js * auth: reset * stage: basic rendering of <HomePage /> (src > app > views > HomePage.js) inside of <GATSBY_INDEX /> (src > pages > index.js) * Updated: nodes.md * auth0-gatsby starter project * reNamed: account functionality to app * auth0: V1 of integration working started from a simple auth0-gatsby starter (https://github.com/auth0-blog/gatsby-auth0) project & adapted what I had previously done to integrate the contentful CMS into gatsby * updated: ReadMe.md * bug: .js.js changed to .js on a few pages * updated: license
An extra note on the "dummy image" - I believe you need to publish it too as it didn't work for me when in draft mode. |
this has worked for me. Thank you. |
Seems like this was introduced #15284 (assumption of prior support based on leftover comments).
In the newer mode of query generation filtering out the https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/query/query-compiler.js#L137 on this line you can dump just before the |
This issue has now returned for me. |
Hitting this issue again sadly. |
Hello, a google search for this error brought me here :) I added an image to contentful as mentioned above and also did clear cache as mentioned above at the same time! So I can't share which one fixed it but the compilation errors went away and the project was successfully built. |
The dummy image is what fixed this issue for me. I don't use Contentful for images, so seems like an odd requirement to have at least one published image. |
Tried |
It works for me too. Thanks ) |
Is there any development to this problem? I have the same issue if I don't upload a random picture to Contentful then it fails. |
@lappang-cheung Did you try recent Gatsby version? |
Creating an asset in the media tab also solved it for me |
Getting this issue too=/ Already tried gatsby clean, adding an image - This is the error I am getting: |
From the Contentful interface upload an image manually, restart your Gatsby developmente server, and you should be good to go 👍 . |
How do I do that?
…Sent from my iPhone
On Jul 14, 2020, at 5:39 PM, emilianopb92 ***@***.***> wrote:
From the Contentful interface upload an image manually, restart your Gatsby developmente server, and you should be good to go 👍 .
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Ooo yes I already uploaded an image! I already restarted server and it didn’t work
…Sent from my iPhone
On Jul 14, 2020, at 5:55 PM, Emily Herr ***@***.***> wrote:
How do I do that?
Sent from my iPhone
>> On Jul 14, 2020, at 5:39 PM, emilianopb92 ***@***.***> wrote:
>>
>
> From the Contentful interface upload an image manually, restart your Gatsby developmente server, and you should be good to go 👍 .
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hey there it still doesn’t work :/
…Sent from my iPhone
On Jul 14, 2020, at 5:55 PM, Emily Herr ***@***.***> wrote:
How do I do that?
Sent from my iPhone
>> On Jul 14, 2020, at 5:39 PM, emilianopb92 ***@***.***> wrote:
>>
>
> From the Contentful interface upload an image manually, restart your Gatsby developmente server, and you should be good to go 👍 .
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub, or unsubscribe.
|
Description
When I try to link my gatsby project with my self -created Contentful space, it shows this issue all the time
But when I try to link my gatsby to a contentful spaces with I created with their templates or examples, it runs fine
But for self created spaces, it shows this error....
Any solutions?
##Error Message
ERROR #85901 GRAPHQL
There was an error in your GraphQL query:
Unknown type "ContentfulFixed". Did you mean "ContentfulSecondTry", "ContentfulContentType", or "ContentfulSecondTryEdge"?
Environment
I was in the latest gatsby-source-contentful and gatsby.
Any solutions?
The text was updated successfully, but these errors were encountered: