question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[gatsby-source-contentful] Error at fresh installment

See original GitHub issue

Hey. I’m currently trying to setup a basic gatsby site with the contentful-source-plugin. Last week everything went pretty great, until that moment I had to show off my results and - bam - the whole thing went down in 5 minutes. I had no success in recreating and debugging.

Specifically gatsby-source-contentful errors out with the following: entryItemFields[foreignReference.name].push is not a function

Preconditions: node -v: 8.9.1 gatsby-cli -v: 1.1.24 gatsby-cource-contentful version: tried everyone from 1.3.20 to 1.3.28

Steps to reproduce:

  1. npm i -g gatsby-cli
  2. gatsby new testdir && cd testdir
  3. yarn add gatsby-source-contentful -S
  4. Editing gatsby-config.js
plugins: [
    {
      resolve: `gatsby-source-contentful`,
      options: {
        spaceId: `MY_CORRECT_SPACEID`,
        accessToken: `MY_CORRECT_ACCESS_TOKEN`,
      },
    },
    `gatsby-plugin-react-helmet`
  ],
  1. (optionally) Editing gatsby-node.js and inserting/editing code from example gatsby-contentful-site

Thanks for any help!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:27 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
captainsaskcommented, May 12, 2018

Just wondering if there had been any updates on this issue. I’m seeing the same thing as soon as I added references into my contentful data. It seems to be happening on build or develop. I tried using the previous method of deleting the redux-state.json in cache then rerunning but it doesn’t seem to make a difference.

3reactions
e1morenocommented, Dec 7, 2017

@cpannwitz I fully agree. I was able to circumvent the issue for about a day. I had to redo the Content models and content to get it to work. Luckily, I am at testing so this is no big deal. However, once I had the need to edit the content. The issue appeared again.

Like you I noticed the following:

  • References are dropped altogether. For my edited contents the references were null. Untouched elements remained pristine. Note, gatsby did launch and did not error out on compile time
  • The issue with compile time occurred when I deleted those invalid elements. It is like they are negotiating on the deleted element. I would have to recreate the deleted element for gatsby to compile.

At this point, I would like to know what do we do from here? What is the next step and I’ll take it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

gatsby-source-contentful options error on build - Stack Overflow
You have to set your .env variables in Netlify with GATSBY_ prefix. So, your CONTENTFUL_ID variable will be GATSBY_CONTENTFUL_ID .
Read more >
gatsby-source-contentful
gatsby -source-contentful will acquire fresh data, and all ContentfulAsset s will be downloaded and cached again. Sourcing From Multiple Contentful Spaces. To ...
Read more >
gatsby-source-contentful - npm
Gatsby source plugin for building websites using the Contentful CMS as a data source. Latest version: 8.3.1, last published: a day ago.
Read more >
Delft Students On Software Architecture: DESOSA 2020
Sentry, a system for triaging, analyzing and resolving errors and bugs. ... Gatsby, the free and open source framework based on React 1...
Read more >
deal | The Software Report
Arcadia breaks the fossil fuel monopoly by creating unprecedented access to energy data and renewable energy sources through its technology platform, Arc, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found