abonventre / gatsby-source-thirdparty

A gatsby source plugin for pulling in third party api data.
20 stars 44 forks source link

UNHANDLED REJECTION Encountered an error trying to infer a GraphQL type for: `localImage___NODE`. There is no corresponding node with the `id` field matching: #10

Open markjenkinson opened 5 years ago

markjenkinson commented 5 years ago

Having just upgraded to Gatsby 2.5.15, gatsby develop started producing this ERROR:

UNHANDLED REJECTION Encountered an error trying to infer a GraphQL type for: localImage___NODE. There is no corresponding node with the id field matching: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX".

If I perform a gatsby clean before every develop there are no errors. But as soon as I try to run gatsby develop on an existing cache, the errors kill the build.

It appears that when running off cache, for whatever reason the gatsby-plugin-remote-images attempts to resolve before the gatsby-source-thirdparty plugin resolves, and everything fails :

{
    resolve: 'gatsby-source-thirdparty',
    options: {
          url: 'https://thirdparty.api/public/v1/posts/?news_group_id=1&start=0&limit=3',
          name: 'Posts',
          payloadKey: 'posts',
    },
},
{
    resolve: 'gatsby-plugin-remote-images',
    options: {
        nodeType: 'thirdParty__Posts',
        imagePath: 'remote_url',
    },
}

I've spent the day researching this, and have come up fairly empty. And I can't exactly tell if the issue is with Gatsby, this plugin, or the gatsby-plugin-remote-images plugin.

Any thoughts for this broken and weary soul? :P