Error: Invariant Violation: Encountered an error trying to infer a GraphQL type for: "primary.image.localFile___NODE".
See original GitHub issueOk, 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:
- Created 5 years ago
- Comments:16 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try deleting your
.cache
andpublic
folder. Then make sure that you don’t use any.gif
for your image slice.Closing this issue then as it’s just weird behavior of Gatsby. Happens sometimes 😆