Gatsby: Unknown type "ContentfulFixed". Did you mean "ContentfulBlogPost", "ContentfulContentType", or "ContentfulBlogPostEdge"?

Created on 8 Aug 2019  ·  69Comments  ·  Source: gatsbyjs/gatsby

ERROR #85901 GRAPHQL

I'm trying to fetch my blogs from contentful and it's giving me a weird error.
The only reason I am opening this issue is because the error told me to so.

This is what the error said:
Error: The result of this StaticQuery could not be fetched.

"This is likely a bug in Gatsby and if refreshing the page does not fix it, please open an issue in https://github.com/gatsbyjs/gatsby/issues"

gatsby info output:

System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz
Binaries:
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 3.7.2
Browsers:
Edge: 44.18362.1.0
npmPackages:
gatsby: ^2.13.51 => 2.13.51
gatsby-plugin-sass: ^2.1.4 => 2.1.4
gatsby-plugin-sharp: ^2.2.10 => 2.2.10
gatsby-remark-images: ^3.1.7 => 3.1.7
gatsby-remark-relative-images: ^0.2.3 => 0.2.3
gatsby-source-contentful: ^2.1.18 => 2.1.18
gatsby-source-filesystem: ^2.1.9 => 2.1.9
gatsby-transformer-remark: ^2.6.11 => 2.6.11

error UNHANDLED REJECTION

Error: The system cannot find the path specified.

  • envinfo.js:1 Function.e.exports.sync
    [v12.0.0]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:4908

  • envinfo.js:1 Object.copySync
    [v12.0.0]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:66886

  • envinfo.js:1 Object.t.writeSync
    [v12.0.0]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:48715

  • envinfo.js:1
    [v12.0.0]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:46872

  • envinfo.js:1
    [v12.0.0]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:46887

  • task_queues.js:88 processTicksAndRejections
    internal/process/task_queues.js:88:5

needs reproduction GraphQL bug

Most helpful comment

For those having the same error, I resolved mine without deleting any data or downgrading any packages by doing these steps:

  1. Go into your Contentful space
  2. Click on the 'Media' tab and add a single asset as a dummy image to act as a placeholder
  3. restart dev server by running npm run develop or gatsby develop

Hopefully, this solves your issues as well though It might be helpful if someone can enlighten us why this is the case.

All 69 comments

Hi @EdinK1, would you be willing to share a repo for this codebase so we can dive deeper and figure out what specifically is causing this error to appear. If not, can you make a reproduction of this?

Hi @lannonbr . Sure here's the link to my repo. The problem seems to be coming from the fragments.js on the gatsbty-source-contenful folder. I've gitignored the node modules folder. Let me know if you need to take a look at the node modules as well.

I also just got this error. I was following this tutorial https://www.youtube.com/watch?v=8t0vNu2fCCM&t=13486s and when I tried adding a query on blog.js it gave me a error. The weird thing is that it was working before in graphi.

I'm able to reproduce this error while following this: https://itnext.io/content-management-with-gatsby-netlify-and-contentful-70f03de41602.

Deleting the node_modules/gatsby-source-contentful/sec/fragments.js seemed to have "fixed" the error.

Hmm, yeah it worked for me as well. I don't know if this is the correct way of doing it but thanks anyways!

I am getting a similar error, deleting fragments file is not working for me. Anybody found a solution yet?

Deleting the fragments file should do the trick. Try restarting your server.

Thank you, it worked by deleting the fragments file, Although it seems more like a workaround than a true solution. Anybody dug deep into this?

Same problem here, cant find whats the problem with contentful images

export const mainQuery = graphql`
  query {
    contents: allContentfulContents {
      edges {
        node {
          slug
          title
          content {
            json
          }
          cover {
            fluid {
              ...GatsbyContentfulFluid_noBase64
            }
          }
          gallery {
            id
            fluid {
              src
            }
          }
        }
      }
    }
  }
`

Tried all of the contentful fragments, none of them works.

export const query = graphql`
  query {
    contentfulBlogPost {
      title
      publishedDate
      body {
        json
      }
    }
  }
`

I believe this is where all your images and content from your contentful blog is. (body { json } )

Update: after updating gatsby-source-contentful, seems that bug is gone, at least, i got my images now. But previously, i got same error message, that said, that error is propobally from Gatsby & i should post about that error here, on github.

I have the same problem.

[email protected]
[email protected]
[email protected] ( tried older version too, the same problem )

I have created gatsby project like this:
gatsby new great_gatsby_bootcamp https://github.com/gatsbyjs/gatsby-starter-hello-world

Installed [email protected] and setup env. variables, like is described in README.md.

Created some simple content model:
content-model

And created some content and after run gatsby develop get this errors:
output.txt

Nothing special, almost in a default configuration.

React application at localhost:8000 don't work, I can query contentful by graphql playground.

Had the same issue, try reinstall gatsby-source-contentful to Version 2.1.19, worked for me.
npm install --save gatsby-source-contentful

I tried reinstalling, but no luck. I think its more of a bug or version clash rather than error

I tried reinstalling, but no luck. I think its more of a bug or version clash rather than error

I did following steps:

  1. Deleted fragments.js from gatsby-source-contentful node_modules
  2. Updated gatsby-cli
  3. Cleared cache npm run clean
  4. Tried to gatsby develop, but got error (On other forums, some people managed to fix bug on this step)
  5. Updated source-contentful npm install --save gatsby-source-contentful
  6. Cleared cache npm run clean
  7. gatsby develop and success - its working.

Add an image in your media files in your contentful. And try an image inside your post. This fixed issue for me. How and why I am not sure.

For those having the same error, I resolved mine without deleting any data or downgrading any packages by doing these steps:

  1. Go into your Contentful space
  2. Click on the 'Media' tab and add a single asset as a dummy image to act as a placeholder
  3. restart dev server by running npm run develop or gatsby develop

Hopefully, this solves your issues as well though It might be helpful if someone can enlighten us why this is the case.

Adding of a image helped, image have to be published

I still have this issue. Yesterday it worked when I uploaded a placeholder image, when I moved ahead with the same tutorial, stopped working.
Now I deleted fragment.js (actually just commented out the entire file, to avoid data loss), works fine again.

Have the same issue. Deleting fragments.js - helped.

Deleting the fragments.js file helped remove the error. Although I'm not sure that's a proper solution.
I'm still confused as to how that worked,

Have the same problem. Adding a dummy image on the "Media" tab fixed the issue

Adding image placeholder worked for me

Can you check if [email protected] fixed this issue. @frodd might think his fix could be related.

I would test it, but I can create only 2 spaces at contentful and i'm using both now :/, I can't delete any of them, any other good fairy which can test it? :) thx

Hey, i solved it by just deleting all the content of the fragment.js, nothing else, it didn't work when i deleted the file, but just the content.

deleting fragments.js solved the issue for me, though this doesn't seem like an ideal solution. Where is the fragments.js file used?

Add an image in your media files in your contentful. And try an image inside your post. This fixed issue for me. How and why I am not sure.

works for me too

Thanks @dreilacadin , adding an image to Media resolved the issue for me as well.

I've just done a fresh install and this issue is still occurring. It's surely a bug?

I've just done a fresh install and this issue is still occurring. It's surely a bug?

@wardpeet it looks like it didn't

Deleting fragments.js' content solved the issue for me too.

A trick with adding an image to Media fixed the problem. But why does it work this way?

Deleting fragments.js fixed for development. It did not however fix it for Netlify build. But, adding the media did. What a random "fix".

Also added a placeholder image on the Media tab and that did the trick.

Added a placeholder image and fixed my issues.

add a placeholder image also worked for me

I can also confirm adding a placeholder image fixed this problem for me

Adding a (published!) placeholder image also worked for me.

Having at least 1 media asset in Contentful seems to be the problem. Can the code be changed to be tolerant of this field being missing?

I believe I've followed the same tutorial as the people above ("The Great Gatsby Bootcamp - Full Gatsby.js Tutorial Course" by Mr Andrew Mead, https://www.youtube.com/watch?v=kzWIUX3CpuI)

Issue still exists and can be resolved with deleting the contents of fragment.js in the /gatsby-source-contentful/src/ directory.

I have not tried to add a placeholder image to a Contentful item on their site as suggested above. My project is just for following the tutorial, but I don't want to have the author to be expected to always submit an image.

I greatly fear this is going to have unforeseen side effects in the future and I'm very hesitant to use the solution from the video (Gatsby.js + Contentful) for any proper projects moving forward.

Is there a way to have this issue addressed by an experienced developer?

@martink-rsa I didn't follow that tutorial. I'm working on a real project and encounter that issue too, and my solution was to do the place holder trick :(

I facing this error again on version 2.1.67

This issue happened on version 2.1.69 again even I added a dummy image in contentful

I did all the suggestions with deleting the fragement.js file, reinstalling modules cleaning the cache etc. However what worked for me was added a "dummy" image to my media folder on Contentful... ¯_(ツ)_/¯ This definitely smells like a Bug.

from @Kureyko comments..

  1. Deleted fragments.js from gatsby-source-contentful node_modules
  2. Updated gatsby-cli
  3. Cleared cache npm run clean
  4. Tried to gatsby develop, but got error (On other forums, some people managed to fix bug on this step)
  5. Updated source-contentful npm install --save gatsby-source-contentful
  6. Cleared cache npm run clean
  7. gatsby develop and success - its working.

I am able to reproduce this issue with latest version 2.1.69
I have a content model called blogPost, if I unpublish a published blog post and execute npm run develop, gatsby will throw

ERROR #11321  PLUGIN

"gatsby-node.js" threw an error while running the createPages lifecycle:

Cannot read property 'allContentfulBlogPost' of undefined



  TypeError: Cannot read property 'allContentfulBlogPost' of undefined

  - review-page.js:48 module.exports.buildReviewPages
    build/review-page.js:48:22

  - task_queues.js:85 processTicksAndRejections
    internal/process/task_queues.js:85:5

  - gatsby-node.js:7 async Object.module.exports.createPages
    gatsby-node.js:7:3

  - api-runner-node.js:235 async runAPI

I have to republish that post or publish a new blog post to make the gatsby build success.

Hi,

Same issue here.
Even if you can make it work by simply deleting the .cache file at root of Gatsby project, as soon as you remove any existing content entry (already associated with any media asset) from Contentful, you get a bunch of errors after relaunching Gatsby :

image

  • ERROR #11321 PLUGIN

image

image

  • ERROR #85901 GRAPHQL

    There was an error in your GraphQL query:
    Unknown type "ContentfulFixed".
    File: node_modules/gatsby-source-contentful/src/fragments.js:20:37

  • ERROR #85923 GRAPHQL

    here was an error in your GraphQL query:
    Cannot query field "allContentfulBlogPost" on type "Query".

  • ERROR #98123 WEBPACK

    error Cannot query field "allContentfulBlogPost" on type "Query" graphql/template-strings

And you have to delete the .cache file at root of Gatsby project, to make it work again :-/

So it seems rather Gatsby related (plugins, cache getting corrupted... ??), when DELETING any content from Contenful !!

Cheers

I am able to reproduce this issue with latest version 2.1.69
I have a content model called blogPost, if I unpublish a published blog post and execute npm run develop, gatsby will throw

ERROR #11321  PLUGIN

"gatsby-node.js" threw an error while running the createPages lifecycle:

Cannot read property 'allContentfulBlogPost' of undefined



  TypeError: Cannot read property 'allContentfulBlogPost' of undefined

  - review-page.js:48 module.exports.buildReviewPages
    build/review-page.js:48:22

  - task_queues.js:85 processTicksAndRejections
    internal/process/task_queues.js:85:5

  - gatsby-node.js:7 async Object.module.exports.createPages
    gatsby-node.js:7:3

  - api-runner-node.js:235 async runAPI

I have to republish that post or publish a new blog post to make the gatsby build success.

Add an image in your media files in your contentful, and restart the server.

Add an image in your media files in your contentful, and restart the server.

Already done, as this is always the First workaround you encounter.
Actually, I have media assets associated with blog posts !

You really need to give a try by publishig & then removing a content entry on Contentful...
Normally, you don't have to clear the .cache !!, only maybe restarting the server for every 'unsynching' between contentful's content and Gatsby's slugs app.

Thanks for feedbacks.

Ran across this while diagnosing same issue, and thought I'd share this comment snippet found in the source code in gatsby/packages/gatsby-source-contentful/src/gatsby-node.js

// Check if there are any ContentfulAsset nodes and if gatsby-image is installed. If so,
// add fragments for ContentfulAsset and gatsby-image. The fragment will cause an error
// if there's not ContentfulAsset nodes and without gatsby-image, the fragment is useless.

Because GraphQL doesn't handle null entries well, and by default gatsby-source-contentul plugin queries for all Assets in Contentful, we get an error when there are no Assets to be found.

From discussions in issue #2392 perhaps adding a custom schema to gatsby-source-contentful plugin could prevent these issues. But in the meantime the best "fix" is simply adding any image to Contentful > Media, and not to remove fragments.js.

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! 💪💜

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
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 again for being part of the Gatsby community! 💪💜

Adding a single media element worked for me, too, but I'm curious, is the root cause of this bug Contentful's API or gatsby-source-contentful?

I'm getting the same error as well.

edit: adding an image asset and creating a blog post displaying that image seems to have "fixed" the problem

myName@myComputer:~/www/gatsby-bootcamp$ rm -rf .cache && npm run develop

> [email protected] develop /home/myName/www/gatsby-bootcamp
> env-cmd -f env.development gatsby develop

success open and validate gatsby-configs - 0.067s
success load plugins - 2.227s
success onPreInit - 0.005s
success initialize cache - 0.014s
success copy gatsby files - 0.117s
success onPreBootstrap - 0.015s
success createSchemaCustomization - 0.489s
Starting to fetch data from Contentful
Fetching default locale
default locale is : en-US
contentTypes fetched 1
Updated entries  2
Deleted entries  0
Updated assets  0
Deleted assets  0
Fetch Contentful data: 315.783ms
success source and transform nodes - 0.600s
success building schema - 0.405s
success createPages - 0.032s
success createPagesStatefully - 0.072s
success onPreExtractQueries - 0.004s
success update schema - 0.037s

 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulFixed". Did you mean "ContentfulBlogPost", "ContentfulBlogPostEdge", or "ContentfulContentType"?

File: node_modules/gatsby-source-contentful/src/fragments.js:20:37


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulFixed". Did you mean "ContentfulBlogPost", "ContentfulBlogPostEdge", or "ContentfulContentType"?

File: node_modules/gatsby-source-contentful/src/fragments.js:34:47


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulFixed". Did you mean "ContentfulBlogPost", "ContentfulBlogPostEdge", or "ContentfulContentType"?

File: node_modules/gatsby-source-contentful/src/fragments.js:48:46


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulFixed". Did you mean "ContentfulBlogPost", "ContentfulBlogPostEdge", or "ContentfulContentType"?

File: node_modules/gatsby-source-contentful/src/fragments.js:61:46


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulFixed". Did you mean "ContentfulBlogPost", "ContentfulBlogPostEdge", or "ContentfulContentType"?

File: node_modules/gatsby-source-contentful/src/fragments.js:77:55


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulFluid". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", or "ContentfulBlogPostEdge"?

File: node_modules/gatsby-source-contentful/src/fragments.js:92:37


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulFluid". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", or "ContentfulBlogPostEdge"?

File: node_modules/gatsby-source-contentful/src/fragments.js:106:47


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulFluid". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", or "ContentfulBlogPostEdge"?

File: node_modules/gatsby-source-contentful/src/fragments.js:120:46


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulFluid". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", or "ContentfulBlogPostEdge"?

File: node_modules/gatsby-source-contentful/src/fragments.js:133:46


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulFluid". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", or "ContentfulBlogPostEdge"?

File: node_modules/gatsby-source-contentful/src/fragments.js:149:55


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulResolutions". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", "ContentfulContentType", "ContentfulBlogPostEdge", or "ContentfulBlogPostConnection"?

File: node_modules/gatsby-source-contentful/src/fragments.js:161:43


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulResolutions". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", "ContentfulContentType", "ContentfulBlogPostEdge", or "ContentfulBlogPostConnection"?

File: node_modules/gatsby-source-contentful/src/fragments.js:171:53


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulResolutions". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", "ContentfulContentType", "ContentfulBlogPostEdge", or "ContentfulBlogPostConnection"?

File: node_modules/gatsby-source-contentful/src/fragments.js:181:52


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulResolutions". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", "ContentfulContentType", "ContentfulBlogPostEdge", or "ContentfulBlogPostConnection"?

File: node_modules/gatsby-source-contentful/src/fragments.js:190:52


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulResolutions". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", "ContentfulContentType", "ContentfulBlogPostEdge", or "ContentfulBlogPostConnection"?

File: node_modules/gatsby-source-contentful/src/fragments.js:202:61


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulSizes". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", "ContentfulContentType", or "ContentfulBlogPostEdge"?

File: node_modules/gatsby-source-contentful/src/fragments.js:213:37


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulSizes". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", "ContentfulContentType", or "ContentfulBlogPostEdge"?

File: node_modules/gatsby-source-contentful/src/fragments.js:223:47


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulSizes". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", "ContentfulContentType", or "ContentfulBlogPostEdge"?

File: node_modules/gatsby-source-contentful/src/fragments.js:233:46


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulSizes". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", "ContentfulContentType", or "ContentfulBlogPostEdge"?

File: node_modules/gatsby-source-contentful/src/fragments.js:242:46


 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulSizes". Did you mean "ContentfulBlogPost", "ContentfulBlogPostSys", "ContentfulContentType", or "ContentfulBlogPostEdge"?

File: node_modules/gatsby-source-contentful/src/fragments.js:254:55

failed extract queries from components - 0.695s
success write out requires - 0.037s
success write out redirect data - 0.007s
success onPostBootstrap - 0.003s
⠀
info bootstrap finished - 9.644 s
⠀
success run queries - 0.148s - 11/12 80.81/s
success Generating image thumbnails - 0.900s - 3/3 3.33/s
⠀
You can now view gatsby-starter-hello-world in the browser.
⠀
  http://localhost:8000/
⠀
View the GraphQL Playground, an in-browser IDE, to explore your site's data and schema
⠀
  http://localhost:8000/___graphql
⠀
Note that the development build is not optimized.
To create a production build, use gatsby build
⠀
success Building development bundle - 5.216s

This issue really shouldn't be closed. It has a known cause (using a Contentful space with no media assets). It also has a decent impact considering the number of comments and reactions to comments on this discussion.

Is there any way we can get this reactivated and prevent the bots from closing it?

(Off-topic: I really dislike the trend of maintainers running bots that auto-close issues. Just because something hasn't had a comment in 30 days doesn't make an issue less real or impactful. It encourages unhelpful "+1" comments to keep an issue "alive")

I agree that this should still be open, so I'm reopening.
Anyone has any idea on how to fix this?

Dupe of https://github.com/gatsbyjs/gatsby/issues/15397 not really sure which one is really the best thread to keep open.

I added some details on the other thread about what I found recently; about when this was introduced; and a location we could insert a hook to fix it.

I added below config to the gatsby-config.js:
{ resolve: "gatsby-source-filesystem", options: { name: "src", path:${__dirname}/src, }, }

Just had the same issue, added an image to media assets like suggested and it worked. Makes no sense but did the trick...

The same... after adding an image in Contentful, the issue is gone. The weirdest thing I have ever seen ... ;-9
And: It is not only happening to us, humble earthlings, but you can also see the same happening here: https://www.youtube.com/watch?v=T9hLWjIN-pY
After trying all tricks up their sleeves, finally uploading an image makes it work. Jason Lengstorf himself admits that it is 'definitely a Gatsby issue'!

ERROR #85901 GRAPHQL

I'm trying to fetch my blogs from contentful and it's giving me a weird error.
The only reason I am opening this issue is because the error told me to so.

This is what the error said:
Error: The result of this StaticQuery could not be fetched.

"This is likely a bug in Gatsby and if refreshing the page does not fix it, please open an issue in https://github.com/gatsbyjs/gatsby/issues"

gatsby info output:

System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz
Binaries:
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 3.7.2
Browsers:
Edge: 44.18362.1.0
npmPackages:
gatsby: ^2.13.51 => 2.13.51
gatsby-plugin-sass: ^2.1.4 => 2.1.4
gatsby-plugin-sharp: ^2.2.10 => 2.2.10
gatsby-remark-images: ^3.1.7 => 3.1.7
gatsby-remark-relative-images: ^0.2.3 => 0.2.3
gatsby-source-contentful: ^2.1.18 => 2.1.18
gatsby-source-filesystem: ^2.1.9 => 2.1.9
gatsby-transformer-remark: ^2.6.11 => 2.6.11

error UNHANDLED REJECTION

Error: The system cannot find the path specified.

  • envinfo.js:1 Function.e.exports.sync
    [v12.0.0]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:4908
  • envinfo.js:1 Object.copySync
    [v12.0.0]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:66886
  • envinfo.js:1 Object.t.writeSync
    [v12.0.0]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:48715
  • envinfo.js:1
    [v12.0.0]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:46872
  • envinfo.js:1
    [v12.0.0]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:46887
  • task_queues.js:88 processTicksAndRejections
    internal/process/task_queues.js:88:5

You have to add image in contentful site because in body part you select rich textbox so add any image and then restart your server and these error will be gone.

Give feedback or suggestion for better solution rather than this solution. #happyCoding :)

adding

{ resolve: "gatsby-source-filesystem", options: { name: "src", path: ${__dirname}/src, }, }

the gatsby-config.js helped

I'm able to reproduce this error while following this: https://itnext.io/content-management-with-gatsby-netlify-and-contentful-70f03de41602.

Deleting the node_modules/gatsby-source-contentful/sec/fragments.js seemed to have "fixed" the error.

Fixed the problem for me. Thanks

Thanks man it worked for me :)

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! 💪💜

Is there a way to disable this? ☝️

This issue affects everyone that uses Gatsby with Contentful. In my opinion it should not be closed until we find a fix for this (an actual fix, not a work-around).

This is a duplicate now of https://github.com/gatsbyjs/gatsby/issues/15397 and we'd like to track it there.

For those having the same error, I resolved mine without deleting any data or downgrading any packages by doing these steps:

  1. Go into your Contentful space
  2. Click on the 'Media' tab and add a single asset as a dummy image to act as a placeholder
  3. restart dev server by running npm run develop or gatsby develop

Hopefully, this solves your issues as well though It might be helpful if someone can enlighten us why this is the case.

Adding an image to the media assets worked for me too. Don't know why either.

Was this page helpful?
0 / 5 - 0 ratings