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.

Failed We've encountered an error: Minified React error #31

See original GitHub issue

Description

I get the following error every time I run gatsby develop.

Gatsby clean hasn’t solved it.

I don’t get any other info, so it’s really hard to understand why. There are some dependency issues, so it could be that. (I didn’t use to have this issue).

success open and validate gatsby-configs - 0.081s
success load plugins - 1.531s
success onPreInit - 0.052s
success initialize cache - 0.008s
success copy gatsby files - 0.116s
success onPreBootstrap - 0.018s
success createSchemaCustomization - 0.005s
success Checking for changed pages - 0.001s
success source and transform nodes - 0.525s
success building schema - 0.384s
failed We've encountered an error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Bdata%7D&args[]= for the full message or use the non-minified dev
environment for full errors and additional helpful warnings.

Describe the issue that you’re seeing.

Steps to reproduce

run gatsby develop

Environment


  System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 15.11.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.14.0 - /usr/local/bin/npm
  Languages:
    Python: 3.9.2 - /usr/local/bin/python
  Browsers:
    Chrome: 91.0.4472.77
    Firefox: 88.0.1
    Safari: 14.1
  npmPackages:
    gatsby: ^3.2.1 => 3.6.2
    gatsby-plugin-feed: ^3.3.0 => 3.6.0
    gatsby-plugin-google-analytics: ^3.3.0 => 3.6.0
    gatsby-plugin-image: ^1.3.0 => 1.6.0
    gatsby-plugin-manifest: ^3.3.0 => 3.6.0
    gatsby-plugin-mdx: ^2.3.0 => 2.6.0
    gatsby-plugin-mdx-frontmatter: ^0.0.4 => 0.0.4
    gatsby-plugin-page-creator: ^3.3.0 => 3.6.0
    gatsby-plugin-postcss: ^4.3.0 => 4.6.0
    gatsby-plugin-react-helmet: ^4.3.0 => 4.6.0
    gatsby-plugin-sharp: ^3.4.1 => 3.6.0
    gatsby-plugin-sitemap: ^3.3.0 => 3.3.0
    gatsby-remark-images: ^5.1.0 => 5.3.0
    gatsby-remark-prismjs: ^5.0.0 => 5.3.0
    gatsby-source-filesystem: ^3.3.0 => 3.6.0
    gatsby-transformer-remark: ^4.1.0 => 4.3.0
    gatsby-transformer-sharp: ^3.3.0 => 3.6.0
  npmGlobalPackages:
    gatsby-cli: 3.6.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
odyslamcommented, Jun 13, 2021

I managed to solve the problem, by changing nearly all packages to an older version.

The thing is that the solution was a combination of changing the packages and a fix in the code. I gave MDXProvider a {children} object instead of {mdx.body}. The thing is that in my old code, that part was correct ( I assume that trying to solve this problem, I changed it by mistake).

TBH, after spending so many hours, I have no idea what was it. It has to do for sure with the MDX plugin, other than that. I have literally no idea.

0reactions
github-actions[bot]commented, Aug 13, 2021

Hey again!

It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else. As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 💪💜

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why am I getting "Minified React error #31" after creating a ...
1 · Seems this would be after adding some code, as I've created a third new project and gatsby develop ran perfectly without...
Read more >
Getting this error, please help: "Minified React error #31"
The problem is Set-UDElement's JavaScript implementation for New-UDElement is expecting an array but receiving a single item. If you force it to ...
Read more >
Minified React Error #31 - Support - DHIS2 Community
We noticed that this issue affected single value chart items created using indicators (whose components are program indicators). I have tried ...
Read more >
Minified React error #31 · Issue #110 - GitHub
Hey, I am using this plugin on a project that uses WordPress as a cms and I ran into this error, which stops...
Read more >
React error 31 when editing page - WordPress.org
According to React that's: Objects are not valid as a React child (found: object with keys {rendered}). If you meant to render a...
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