Gatsby: WebpackError: Invariant Violation: Minified React error # 62

Creado en 26 ene. 2019  ·  1Comentario  ·  Fuente: gatsbyjs/gatsby

Para que sea más fácil para nosotros ayudarlo, incluya tanta información útil como sea posible. Enlaces útiles: - Documentación: https://www.gatsbyjs.org/docs/ Gatsby tiene varios canales de apoyo comunitario, intente hacer su pregunta en: - Discord: https://gatsby.app/discord - Spectrum: https: // espectro.chat/gatsby-js - Twitter: https://twitter.com/gatsbyjs Antes de abrir un nuevo número, busque los problemas existentes https://github.com/gatsbyjs/gatsby/issues

Resumen

Gatsby build arroja WebpackError: Invariant Violation: Minified React error #62 error, gatsby Develop funciona sin problemas aunque incluso duro gatsby develop works fine .

Informacion relevante

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.

Este es el mensaje de error completo que recibo. Intenté eliminar todos los mapeos incorrectos de propiedades de estilo como se describe en el mensaje de error completo de React, pero el problema persiste. También borré .cache .

No sé qué más podría ser el problema, ya que pude hacer una compilación exitosa antes y el mensaje no proporciona más información sobre lo que podría estar mal con mi código, especialmente porque puedo ejecutarlo perfectamente con gatsby develop .

Medio ambiente (si es relevante)

''
Sistema:
SO: macOS 10.14.2
CPU: (8) CPU Intel (R) Core (TM) i7-4750HQ x64 a 2,00 GHz
Shell: 3.2.57 - / bin / bash
Binarios:
Nodo: 11.7.0 - / usr / local / bin / node
Hilado: 1.13.0 - / usr / local / bin / yarn
npm: 6.5.0 - / usr / local / bin / npm
Idiomas:
Python: 2.7.10 - / usr / bin / python
Navegadores:
Cromo: 71.0.3578.98
Safari: 12.0.2
npm Paquetes:
gatsby: ^ 2.0.76 => 2.0.76
imagen-de-gatsby: ^ 2.0.20 => 2.0.25
gatsby-plugin-manifest: ^ 2.0.9 => 2.0.12
gatsby-plugin-offline: ^ 2.0.16 => 2.0.20
gatsby-plugin-react-casco: ^ 3.0.2 => 3.0.5
gatsby-plugin-sharp: ^ 2.0.14 => 2.0.16
gatsby-source-filesystem: ^ 2.0.8 => 2.0.12
gatsby-transformer-sharp: ^ 2.1.8 => 2.1.9

### File contents (if changed)

`gatsby-config.js`:<!-- Please use a code block or just leave it as is if wasn't changed -->

module.exports = {
siteMetadata: {
título: Gatsby Starter ,
descripción: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need. ,
autor: @gatsbyjs ,
vínculos sociales: [
{
nombre: Link 1 ,
URL: https://twitter.com/ ,
},
{
nombre: link 2 ,
URL: https://github.com/ ,
}
],
características: [
{
título: Feature 1 ,
descripción: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need. ,
},
{
título: Feature 2 ,
descripción: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need. ,
},
{
título: Feature 3 ,
descripción: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need. ,
},
],
},
complementos: [
gatsby-plugin-react-helmet ,
{
resolver: gatsby-source-filesystem ,
opciones: {
nombre: images ,
ruta: ${__dirname}/src/images ,
},
},
gatsby-transformer-sharp ,
gatsby-plugin-sharp ,
{
resolver: gatsby-plugin-manifest ,
opciones: {
nombre: gatsby-starter-default ,
nombre_corto: starter ,
start_url: / ,
background_color: #663399 ,
theme_color: #663399 ,
mostrar: minimal-ui ,
icon: src/images/gatsby-icon.png , // Esta ruta es relativa a la raíz del sitio.
},
},
// este complemento (opcional) habilita la aplicación web progresiva + la funcionalidad sin conexión
// Para obtener más información, visite: https://gatsby.app/offline
// 'gatsby-plugin-offline',
],
}

`package.json`:<!-- Please use a code block or just leave it as is if wasn't changed -->

{
"nombre": "gatsby-starter-default",
"privado": verdadero,
"description": "Un comienzo simple para empezar y desarrollar rápidamente con Gatsby",
"versión": "0.1.0",
"author": "Kyle Mathews [email protected] ",
"dependencias": {
"gatsby": "^ 2.0.76",
"gatsby-image": "^ 2.0.20",
"gatsby-plugin-manifest": "^ 2.0.9",
"gatsby-plugin-offline": "^ 2.0.16",
"gatsby-plugin-react-helmet": "^ 3.0.2",
"gatsby-plugin-sharp": "^ 2.0.14",
"gatsby-source-filesystem": "^ 2.0.8",
"gatsby-transformer-sharp": "^ 2.1.8",
"prop-types": "^ 15.6.2",
"reaccionar": "^ 16.6.3",
"react-dom": "^ 16.6.3",
"react-helmet": "^ 5.2.0"
},
"palabras clave": [
"gatsby"
],
"licencia": "MIT",
"guiones": {
"build": "gatsby build",
"desarrollar": "gatsby desarrollar",
"inicio": "npm ejecutar desarrollar",
"formato": "más bonito --escribir \" src / * / .js \ "",
"test": "echo \" ¡Escribe pruebas! -> https: //gatsby.app/unit-testing \ ""
},
"devDependencies": {
"más bonita": "^ 1.15.2"
},
"repositorio": {
"tipo": "git",
"url": " https://github.com/gatsbyjs/gatsby-starter-default "
},
"insectos": {
"url": " https://github.com/gatsbyjs/gatsby/issues "
}
}
`` gatsby-node.js : N/A <!-- Please use a code block or just leave it as is if wasn't changed --> gatsby-browser.js : N/A <!-- Please use a code block or just leave it as is if wasn't changed --> gatsby-ssr.js`: N / A

Comentario más útil

~ @AlexanderProd Me encuentro con el mismo problema; ¿Cuál fue la causa del tuyo? ~

No importa, en mi caso, estaba usando

bodyAttributes={{
  style: 'some style string'
}}

dentro de la instancia SEO.js <Helmet /> generada automáticamente. El uso de un objeto de estilo no funcionaba, lo que imagino que es un problema con react-helmet. Convertir mi estilo en una clase y usarlo resolvió mi problema.

Para otras personas que llegan por Google, el error es una invocación incorrecta style (es decir, no use cadenas, use objetos).

>Todos los comentarios

~ @AlexanderProd Me encuentro con el mismo problema; ¿Cuál fue la causa del tuyo? ~

No importa, en mi caso, estaba usando

bodyAttributes={{
  style: 'some style string'
}}

dentro de la instancia SEO.js <Helmet /> generada automáticamente. El uso de un objeto de estilo no funcionaba, lo que imagino que es un problema con react-helmet. Convertir mi estilo en una clase y usarlo resolvió mi problema.

Para otras personas que llegan por Google, el error es una invocación incorrecta style (es decir, no use cadenas, use objetos).

¿Fue útil esta página
0 / 5 - 0 calificaciones

Temas relacionados

dustinhorton picture dustinhorton  ·  3Comentarios

magicly picture magicly  ·  3Comentarios

Oppenheimer1 picture Oppenheimer1  ·  3Comentarios

3CordGuy picture 3CordGuy  ·  3Comentarios

jimfilippou picture jimfilippou  ·  3Comentarios