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

Issue with Gatsby v3 #267

Closed LukasJokubas closed 3 years ago

LukasJokubas commented 3 years ago

Hi,

I have been using your starter for some time now and it worked perfectly with Gatsby V2 and Ghost v3. Recently I upgraded to Ghost v4 and Gatsby to v3 and now I am receiving build errors:

"gatsby-theme-try-ghost" threw an error while running the createPages lifecycle:

The "url" argument must be of type string. Received undefined

My package.json:

"peerDependencies": {
    "gatsby": "^2.0.0"
  },
  "dependencies": {
    "@isamrish/gatsby-plugin-google-adsense": "^1.2.0",
    "@styled-icons/fa-solid": "^10.18.0",
    "algoliasearch": "^4.4.0",
    "gatsby": "^3.0.0",
    "gatsby-plugin-ackee-tracker": "^2.2.0",
    "gatsby-plugin-advanced-sitemap": "^1.6.0",
    "gatsby-plugin-gatsby-cloud": "^2.0.0",
    "gatsby-plugin-google-analytics": "^3.4.0",
    "gatsby-plugin-netlify": "^3.0.0",
    "gatsby-plugin-preact": "^5.0.0",
    "gatsby-plugin-styled-components": "^4.0.0",
    "gatsby-rehype-ghost-links": "^2.0.0",
    "gatsby-rehype-prismjs": "^2.0.0",
    "gatsby-theme-ghost-dark-mode": "^2.0.0",
    "gatsby-theme-ghost-members": "^2.0.0",
    "gatsby-theme-ghost-toc": "^2.0.0",
    "gatsby-theme-try-ghost": "2.0.0",
    "gatsby-transformer-rehype": "^2.0.0",
    "preact": "^10.5.12",
    "preact-render-to-string": "^5.1.12",
    "prismjs": "^1.23.0",
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    "react-instantsearch-dom": "^6.7.0",
    "react-scripts": "^4.0.3",
    "styled-components": "^5.2.1"
  },
  "devDependencies": {
    "babel-eslint": "^10.1.0",
    "eslint": "^7.21.0",
    "eslint-plugin-ghost": "^2.0.0",
    "eslint-plugin-react": "^7.22.0",
    "gh-pages": "^3.1.0",
    "react": "^17.0.1",
    "react-dom": "^17.0.1"
  }

I, also tried running fresh starter (no changes) with my Ghost keys and I receive:

"gatsby-source-try-ghost" threw an error while running the sourceNodes lifecycle:

Request failed with status code 414

You can try yourself: https://valdymas.medeinos.lt e3ec7b18ad58b7795bb82f2a15

My initial thought would be that this could be data issue, however build is working fine with the same data and gatsby v2, your help in resolving this would be greatly appreciated.

styxlab commented 3 years ago

This repository has been updated to Gatsby 'v3' and I am also feeding it with a Ghost 'v4' instance. Could you please test the latest version of this repository with your Ghost 'v4' instance, in order to see if you get the same errors? I suspect that you made some customizations yourself that are not compatible.

LukasJokubas commented 3 years ago

@styxlab I just tried installing this theme, adding only my API url and key and running yarn develop, I still get:

"gatsby-source-try-ghost" threw an error while running the sourceNodes lifecycle:

Request failed with status code 414

Could you please try the same with my provided API credentials above and let me know if you can reproduce?

styxlab commented 3 years ago

I tested with you credentials but I am having network problems building your whole project.

Could you please make a smaller copy of your Ghost CMS, ideally with just one article that runs into the 414 error?

styxlab commented 3 years ago

Closed due to inactivity.