You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gatsby build throws WebpackError: Invariant Violation: Minified React error #62 error, gatsby develop works without problems though even tough gatsby develop works fine.
Relevant information
error Building static HTML for pages failed
See our docs page on debugging HTML builds for help https://gatsby.app/debug-html
8 | else
9 | root["lib"] = factory(root["@reach/router"], root["core-js/modules/es6.array.iterator"], root["core-js/modules/es6.array.sort"], root["core-js/modules/es6.function.name"], root["core-js/modules/es6.map"], root["core-js/modules/es6.object.assign"], root["core-js/modules/es6.regexp.constructor"], root["core-js/modules/es6.regexp.split"], root["core-js/modules/es6.regexp.to-string"], root["core-js/modules/es6.string.ends-with"], root["core-js/modules/es6.string.iterator"], root["core-js/modules/web.dom.iterable"], root["fs"], root["lodash"], root["path"], root["react"], root["react-dom/server"], root["react-helmet"]);
> 10 | })(this, function(__WEBPACK_EXTERNAL_MODULE__reach_router__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_array_iterator__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_array_sort__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_function_name__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_map__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_object_assign__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_regexp_constructor__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_regexp_split__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_regexp_to_string__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_string_ends_with__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_string_iterator__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_web_dom_iterable__, __WEBPACK_EXTERNAL_MODULE_fs__, __WEBPACK_EXTERNAL_MODULE_lodash__, __WEBPACK_EXTERNAL_MODULE_path__, __WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom_server__, __WEBPACK_EXTERNAL_MODULE_react_helmet__) {
| ^
11 | return
WebpackError: Invariant Violation: Minified React error #62; visit https://reactjs.org/docs/error-decoder.html?invariant=62&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
This is the full error message I'm getting. I've tried eliminating every wrong mapping of style properties like described in the full React error message but the problem still persists. I've also deleted .cache.
I don't know what else could be the problem since I could do a successful build earlier and the message doesn't provide any more insights on what could be wrong with my code, especially since I can perfectly run it with gatsby develop.
module.exports = {
siteMetadata: {
title: `Gatsby Starter`,
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
author: `@gatsbyjs`,
socialLinks: [
{
name: `Link 1`,
url: `https://twitter.com/`,
},
{
name: `link 2`,
url: `https://github.com/`,
}
],
features: [
{
title: `Feature 1`,
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
},
{
title: `Feature 2`,
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
},
{
title: `Feature 3`,
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
},
],
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
background_color: `#663399`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.app/offline
// 'gatsby-plugin-offline',
],
}
@AlexanderProd I'm running into the same issue; what was the cause of yours?
Nevermind, in my case, I was using
bodyAttributes={{style: 'some style string'}}
inside the auto-generated SEO.js's <Helmet /> instance. Using a style object wasn't working, which I'd imagine is a problem with react-helmet. Converting my style to a class and using that instead solved my problem.
For other people arriving by Google, the error is an incorrect style invocation (ie, don't use strings, use objects).
Summary
Gatsby build
throwsWebpackError: Invariant Violation: Minified React error #62
error, gatsby develop works without problems though even toughgatsby develop works fine
.Relevant information
This is the full error message I'm getting. I've tried eliminating every wrong mapping of style properties like described in the full React error message but the problem still persists. I've also deleted
.cache
.I don't know what else could be the problem since I could do a successful build earlier and the message doesn't provide any more insights on what could be wrong with my code, especially since I can perfectly run it with
gatsby develop
.Environment (if relevant)
File contents (if changed)
gatsby-config.js
:package.json
:gatsby-node.js
: N/Agatsby-browser.js
: N/Agatsby-ssr.js
: N/AThe text was updated successfully, but these errors were encountered: