IE11: Object not valid as React Child
See original GitHub issueDescription
Since a few weeks, we get more and more errors from IE11 users, the error messages are Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner})
(similar to #7003, so sorry if it should have been re-opened instead)
Few things I’ve found so far (trying to fix it):
- The error seems to be introduced starting from Gatsby
v2.8.0
- The error while developing (I mean
gatsby develop
) isPromise is ‘undefined’
(-> possibly there is a new promise introduced that isn’t being polyfilled)
I would like to help tackle this issue, but I could use some help to start 😅
Steps to reproduce
Visit https://www.gatsbyjs.org/ in IE11 and look at the console.
Expected result
IE11 users should be able to use a regular Gatsby website.
Actual result
The website breaks for them and React throws an error
Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner})
Environment
System:
OS: macOS 10.14.5
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.15.3 - /usr/local/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/local/bin/python
Browsers:
Chrome: 74.0.3729.169
Safari: 12.1.1
npmPackages:
gatsby: ^2.9.9 => 2.9.11
gatsby-image: ^2.1.4 => 2.1.4
gatsby-plugin-emotion: ^4.0.6 => 4.0.7
gatsby-plugin-portal: ^1.0.7 => 1.0.7
gatsby-plugin-purgecss: ^4.0.0 => 4.0.0
gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12
gatsby-plugin-react-svg: ^2.1.1 => 2.1.1
gatsby-plugin-sass: ^2.0.11 => 2.0.11
gatsby-plugin-sentry: ^1.0.1 => 1.0.1
gatsby-plugin-sharp: ^2.1.7 => 2.1.7
gatsby-source-apiserver: ^2.1.2 => 2.1.2
gatsby-source-filesystem: ^2.0.41 => 2.0.41
gatsby-source-graphql: ^2.0.19 => 2.0.19
gatsby-transformer-sharp: ^2.1.21 => 2.1.21
gatsby-transformer-yaml: ^2.1.12 => 2.1.12
npmGlobalPackages:
gatsby-cli: 2.6.13
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:12 (10 by maintainers)
Top Results From Across the Web
Objects are not valid as a react child (In Internet explorer 11 ...
I've resolved this issue by reordering polyfill and react / react-dom to be sure that the polyfill Symbol is loaded before React and...
Read more >Objects are not valid as a React child error occurring in IE11 ...
The app fails to load in IE11 on Win 7 with the following error: SCRIPT5022: Objects are not valid as a React child...
Read more >Understanding the "Objects are not valid as a react child" Error ...
The "Objects are not valid as a React child" error happens when trying to render a collection of data by mistakenly returning the...
Read more >IE error: Objects are not valid as a React child - GitLab - Eclipse
React app won't work in IE11, we will see an empty page with this error. Error message: Objects are not valid as a...
Read more >Resolving Error: "Objects are not valid as a React child"
As the error message states, React cannot render objects as children directly. If you are seeing this error, there is a good chance...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Interesting, in
gatsby develop
the error I get is:Syntax Error File: commons.js, Line: 47228, Column: 16
which isreturn key => (result, value) => {
so it seems like some missing polyfill in general
@thomascorthouts I have the same issue, just updated to Gatsby
2.21.10
but I still get that error in commons.js.