Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FetchError: invalid json response body - GatsbyJS #123

Open
milan-josipovic opened this issue Aug 22, 2020 · 0 comments
Open

FetchError: invalid json response body - GatsbyJS #123

milan-josipovic opened this issue Aug 22, 2020 · 0 comments

Comments

@milan-josipovic
Copy link

Hi,

My goal is to connect the GatsbyJS hello-world site with Joomla welcome site to fetch the data from Joomla and display them in GatsbyJS site.

  1. I installed GatsbyJS Plugin gatsby-source-joomla-articles (https://www.gatsbyjs.com/plugins/@nilesh_s_techjoomla/gatsby-source-joomla-articles/?=joomla).
  2. I started simple hello-world Joomla welcome site (https://joomla-rest-api.joomla.com/).
  3. I added com_api (https://github.com/techjoomla/com_api) to Joomla in order to fetch the data from Joomla site.

Now when I start a local build of GatsbyJS site I get an errror:

FetchError: invalid json response body at https://joomla-rest-api.joomla.com/index.php&limitstart=0&limit=20 reason: Unexpected token < in JSON at position 0
at C:\Users\PC\Desktop\my-hello-world-starter\node_modules@nilesh_s_techjoomla\gatsby-source-joomla-articles\node_modules\node-fetch\lib\index.js:272:32
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Object.exports.sourceNodes (C:\Users\PC\Desktop\my-hello-world-starter\node_modules@nilesh_s_techjoomla\gatsby-source-joomla-articles\gatsby-node.js:58:23)
at runAPI (C:\Users\PC\Desktop\my-hello-world-starter\node_modules\gatsby\src\utils\api-runner-node.js:330:16) {
type: 'invalid-json'
}

Could you, please be kind to help me out with problem?

ankush-maherwal added a commit to ankush-maherwal/com_api that referenced this issue Sep 14, 2022
ankush-maherwal added a commit that referenced this issue Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant