styxlab / gatsby-theme-try-ghost

A Gatsby theme to build flaring fast blogs from headless Ghost CMS
MIT License
136 stars 56 forks source link

Error: url passed to createRemoteFileNode is either missing or not a proper web #278

Closed paperbun closed 3 years ago

paperbun commented 3 years ago

Hi, I am getting an error while building my gatsby project using this plugin. When I remove this plugin from the config, the build was successful.

ERROR #11321 PLUGIN "gatsby-theme-try-ghost" threw an error while running the createPages lifecycle: Error: url passed to createRemoteFileNode is either missing or not a proper web

I have attached the build log file. Could you please help me how to resolve this?

Thanks

a.txt

styxlab commented 3 years ago

@paperbun welcome! This is not a general purpose plugin and is mostly used as an integral part of gatsby-theme-try-ghost. Are you using it that way, or are you trying to add it to your own, custom project?

paperbun commented 3 years ago

Thanks a lot for your reply. Yes, I am using it with "gatsby-theme-try-ghost" & also I have followed the following article to set up it.

https://www.jamify.org/2020/07/15/running-a-professional-blog-for-free/ When I remove this plugin it is getting built without any error.

Thanks.

styxlab commented 3 years ago

Could you please upload your project on github and explain the exact steps leading to this error? Also note that when you are using Windows, I can only give support if you compile this project with WSL 2.

paperbun commented 3 years ago

Sure, I will try it on WSL2 and let you know the result.

Also, I am facing this issue only when I point it to local Ghost CMS. When I use the default remote ghost CMS, I am not getting any errors. There might be some issue with the images that I have uploaded in the local ghost instance.

I just wanted to know what kind of mistakes usually leads to this error?

Seeing the issue only when I use the following plugin gatsby-rehype-inline-images

Thanks for the help :-)

styxlab commented 3 years ago

I am seeing this error for the first time, but it looks like the images making trouble are base64 encoded. First thing you could try is deactivate the "gatsby-inline-image" plugin just to see if that solves the issue:

[jamify-starter]$ yarn remove gatsby-rehype-inline-images

and remove or comment out the line as shown below:

// gatsby-config.js

plugins: [

    {
        resolve: `gatsby-transformer-rehype`,
        options: {
            filter: node => (
                node.internal.type === `GhostPost` ||
                node.internal.type === `GhostPage`
            ),
            plugins: [
                {
                    resolve: `gatsby-rehype-ghost-links`,
                },
                {
                    resolve: `gatsby-rehype-prismjs`,
                },
                //{
                //    resolve: `gatsby-rehype-inline-images`,
                //},
            ],
        },
    },

]

If it work when sourcing in the content from your remote Ghost instance, it means images in your local installation are different. So you may want to make sure images are the same locally.

paperbun commented 3 years ago

Yes, you are right. There is some issue with the images. When I remove this gatsby-rehype-inline-images plugin it works without any issue.

I will recheck the images. will close this issue. Thanks