question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Invariant Violation: Encountered an error trying to infer a GraphQL type for: "primary.image.localFile___NODE".

See original GitHub issue

Ok, encountered a new error. All I have done since my previous issue was being to edit the homepage (type: homepage) and restart gatsby develop, i tried npm run develop incase there was an issue with the command (trying to cover all bases).

I have no idea why it worked and now it doesn’t. Doesn’t seem to make sense.

success open and validate gatsby-configs — 0.062 s
success load plugins — 0.275 s
success onPreInit — 0.921 s
success delete html and css files from previous builds — 0.015 s
success initialize cache — 0.004 s
success copy gatsby files — 0.086 s
success onPreBootstrap — 0.008 s
⠁ Starting to fetch data from Prismic
⠐ source and transform nodesFetch Prismic data: 891.374ms
success source and transform nodes — 0.945 s
error Encountered an error trying to infer a GraphQL type for: "primary.image.localFile___NODE". There is no corresponding node with the id field matching: "39fba9b7-f9d5-516e-b9db-3f11542c5fc5"


  Error: Invariant Violation: Encountered an error trying to infer a GraphQL type for: "primary.image.localFile___NODE". There is no corresponding node with the id field matching  : "39fba9b7-f9d5-516e-b9db-3f11542c5fc5"
  
  - invariant.js:40 invariant
    [dave-blog-site]/[invariant]/invariant.js:40:15
  
  - infer-graphql-type.js:234 validateLinkedNode
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:234:5
  
  - infer-graphql-type.js:293 inferFromFieldName
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:293:3
  
  - infer-graphql-type.js:359 _.each
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:359:23
  
  - lodash.js:4911 
    [dave-blog-site]/[lodash]/lodash.js:4911:15
  
  - lodash.js:2996 baseForOwn
    [dave-blog-site]/[lodash]/lodash.js:2996:24
  
  - lodash.js:4880 
    [dave-blog-site]/[lodash]/lodash.js:4880:18
  
  - lodash.js:9344 Function.forEach
    [dave-blog-site]/[lodash]/lodash.js:9344:14
  
  - infer-graphql-type.js:338 _inferObjectStructureFromNodes
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:338:5
  
  - infer-graphql-type.js:136 inferGraphQLType
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:136:21
  
  - infer-graphql-type.js:372 _.each
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:372:23
  
  - lodash.js:4911 
    [dave-blog-site]/[lodash]/lodash.js:4911:15
  
  - lodash.js:2996 baseForOwn
    [dave-blog-site]/[lodash]/lodash.js:2996:24
  
  - lodash.js:4880 
    [dave-blog-site]/[lodash]/lodash.js:4880:18
  
  - lodash.js:9344 Function.forEach
    [dave-blog-site]/[lodash]/lodash.js:9344:14
  
  - infer-graphql-type.js:338 _inferObjectStructureFromNodes
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:338:5
  
  - infer-graphql-type.js:136 inferGraphQLType
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:136:21
  
  - infer-graphql-type.js:372 _.each
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:372:23
  
  - lodash.js:4911 
    [dave-blog-site]/[lodash]/lodash.js:4911:15
  
  - lodash.js:2996 baseForOwn
    [dave-blog-site]/[lodash]/lodash.js:2996:24
  
  - lodash.js:4880 
    [dave-blog-site]/[lodash]/lodash.js:4880:18
  
  - lodash.js:9344 Function.forEach
    [dave-blog-site]/[lodash]/lodash.js:9344:14
  

error UNHANDLED REJECTION


  Error: Invariant Violation: Encountered an error trying to infer a GraphQL type for: "primary.image.localFile___NODE". There is no corresponding node with the id field matching  : "39fba9b7-f9d5-516e-b9db-3f11542c5fc5"
  
  - invariant.js:40 invariant
    [dave-blog-site]/[invariant]/invariant.js:40:15
  
  - infer-graphql-type.js:234 validateLinkedNode
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:234:5
  
  - infer-graphql-type.js:293 inferFromFieldName
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:293:3
  
  - infer-graphql-type.js:359 _.each
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:359:23
  
  - lodash.js:4911 
    [dave-blog-site]/[lodash]/lodash.js:4911:15
  
  - lodash.js:2996 baseForOwn
    [dave-blog-site]/[lodash]/lodash.js:2996:24
  
  - lodash.js:4880 
    [dave-blog-site]/[lodash]/lodash.js:4880:18
  
  - lodash.js:9344 Function.forEach
    [dave-blog-site]/[lodash]/lodash.js:9344:14
  
  - infer-graphql-type.js:338 _inferObjectStructureFromNodes
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:338:5
  
  - infer-graphql-type.js:136 inferGraphQLType
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:136:21
  
  - infer-graphql-type.js:372 _.each
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:372:23
  
  - lodash.js:4911 
    [dave-blog-site]/[lodash]/lodash.js:4911:15
  
  - lodash.js:2996 baseForOwn
    [dave-blog-site]/[lodash]/lodash.js:2996:24
  
  - lodash.js:4880 
    [dave-blog-site]/[lodash]/lodash.js:4880:18
  
  - lodash.js:9344 Function.forEach
    [dave-blog-site]/[lodash]/lodash.js:9344:14
  
  - infer-graphql-type.js:338 _inferObjectStructureFromNodes
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:338:5
  
  - infer-graphql-type.js:136 inferGraphQLType
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:136:21
  
  - infer-graphql-type.js:372 _.each
    [dave-blog-site]/[gatsby]/dist/schema/infer-graphql-type.js:372:23
  
  - lodash.js:4911 
    [dave-blog-site]/[lodash]/lodash.js:4911:15
  
  - lodash.js:2996 baseForOwn
    [dave-blog-site]/[lodash]/lodash.js:2996:24
  
  - lodash.js:4880 
    [dave-blog-site]/[lodash]/lodash.js:4880:18
  
  - lodash.js:9344 Function.forEach
    [dave-blog-site]/[lodash]/lodash.js:9344:14

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

39reactions
LekoArtscommented, Jan 19, 2019

Try deleting your .cache and public folder. Then make sure that you don’t use any .gif for your image slice.

7reactions
LekoArtscommented, Feb 7, 2019

Closing this issue then as it’s just weird behavior of Gatsby. Happens sometimes 😆

Read more comments on GitHub >

github_iconTop Results From Across the Web

Encountered an error trying to infer a GraphQL type - Stack ...
On gatsby develop I get Invariant Violation: Encountered an error trying to infer a GraphQL type error: gatsby develop success open and ...
Read more >
Encountered an error trying to infer a GraphQL type ... - GitHub
Invariant Violation : Encountered an error trying to infer a GraphQL type for: `component: There is no corresponding node with the `id` field...
Read more >
Encountered an error trying to infer a GraphQL type for ...
Contentful data that causes Invariant Violation: Encountered an error trying to infer a GraphQL type for contentModel. Here's a fix.
Read more >
Common Gatsby JS Error Encounter During Development
Invariant Violation : Encountered an error trying to infer a GraphQL type for: `apps___NODE`. There is no corresponding node with the `id` ...
Read more >
Basic Types - GraphQL
The GraphQL schema language supports the scalar types of String , Int , Float , Boolean , and ID , so you can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found