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

作成日 2019年01月26日  ·  1コメント  ·  ソース: gatsbyjs/gatsby

私たちがあなたを助けやすくするために、できるだけ多くの有用な情報を含めてください。 便利なリンク:-ドキュメント:https://www.gatsbyjs.org/docs/ Gatsbyにはいくつかのコミュニティサポートチャネルがあります。質問してみてください:-不和:https://gatsby.app/discord-スペクトル:https:// Spectrum.chat/gatsby-js-Twitter:https://twitter.com/gatsbyjs新しい問題を開く前に、既存の問題を検索してくださいhttps://github.com/gatsbyjs/gatsby/issues

概要

Gatsby buildWebpackError: Invariant Violation: Minified React error #62エラーをスローし、gatsbyの開発は困難なgatsby develop works fineでも問題なく動作します。

関連情報

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.

これは私が受け取っている完全なエラーメッセージです。 完全なReactエラーメッセージで説明されているようなスタイルプロパティのすべての間違ったマッピングを排除しようとしましたが、それでも問題は解決しません。 .cacheも削除しました。

以前にビルドを成功させることができ、特にgatsby develop完全に実行できるため、メッセージにはコードのどこが悪いのかについての洞察が得られないため、他に何が問題になる可能性があるのか​​わかりません。

環境(該当する場合)

`` `
システム:
OS:macOS 10.14.2
CPU:(8)x64 Intel(R)Core(TM)i7-4750HQ CPU @ 2.00GHz
シェル:3.2.57- / bin / bash
バイナリ:
ノード:11.7.0- / usr / local / bin / node
糸:1.13.0- / usr / local / bin / yarn
npm:6.5.0- / usr / local / bin / npm
言語:
Python:2.7.10- / usr / bin / python
ブラウザ:
Chrome:71.0.3578.98
Safari:12.0.2
npmPackages:
ギャツビー:^ 2.0.76 => 2.0.76
gatsby-image:^ 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-helmet:^ 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:{
タイトル: Gatsby Starter
説明: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.
著者: @gatsbyjs
socialLinks:[
{{
名前: Link 1
URL: https://twitter.com/
}、
{{
名前: link 2
URL: https://github.com/
}
]、
特徴: [
{{
タイトル: Feature 1
説明: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.
}、
{{
タイトル: Feature 2
説明: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.
}、
{{
タイトル: Feature 3
説明: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.
}、
]、
}、
プラグイン:[
gatsby-plugin-react-helmet
{{
解決: gatsby-source-filesystem
オプション:{
名前: images
パス: ${__dirname}/src/images
}、
}、
gatsby-transformer-sharp
gatsby-plugin-sharp
{{
解決: gatsby-plugin-manifest
オプション:{
名前: gatsby-starter-default
short_name: starter
start_url: /
background_color: #663399
theme_color: #663399
表示: minimal-ui
アイコン: src/images/gatsby-icon.png 、//このパスはサイトのルートからの相対パスです。
}、
}、
//この(オプションの)プラグインはプログレッシブウェブアプリ+オフライン機能を有効にします
//詳細については、 https
// 'gatsby-plugin-offline'、
]、
}

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

{{
"名前": "gatsby-starter-default"、
「プライベート」:true、
「説明」:「ギャツビーですぐに立ち上がって開発するための簡単なスターター」、
「バージョン」:「0.1.0」、
"作成者": "Kyle Mathews [email protected] "、
「依存関係」:{
"ギャツビー": "^ 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"、
"react": "^ 16.6.3"、
"react-dom": "^ 16.6.3"、
"react-helmet": "^ 5.2.0"
}、
「キーワード」:[
「ギャツビー」
]、
「ライセンス」:「MIT」、
「スクリプト」:{
"ビルド": "ギャツビービルド"、
「開発」:「ギャツビー開発」、
"start": "npm run development"、
"format": "prettier --write \" src / * / .js \ ""、
"test": "echo \"テストを書いてください! -> https://gatsby.app/unit-testing \ ""
}、
"devDependencies":{
"よりきれい": "^ 1.15.2"
}、
「リポジトリ」:{
"type": "git"、
"url": " https://github.com/gatsbyjs/gatsby-starter-default "
}、
「バグ」:{
"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

最も参考になるコメント

@ AlexanderProd同じ問題が発生しています。 あなたの原因は何でしたか?〜

気にしないでください、私の場合、私は使用していました

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

自動生成されたSEO.js<Helmet />インスタンス内。 スタイルオブジェクトの使用が機能していませんでした。これは、react-helmetの問題だと思います。 私のスタイルをクラスに変換し、代わりにそれを使用することで私の問題は解決しました。

Googleから到着する他の人にとって、エラーは誤ったstyle呼び出しです(つまり、文字列を使用せず、オブジェクトを使用します)。

>すべてのコメント

@ AlexanderProd同じ問題が発生しています。 あなたの原因は何でしたか?〜

気にしないでください、私の場合、私は使用していました

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

自動生成されたSEO.js<Helmet />インスタンス内。 スタイルオブジェクトの使用が機能していませんでした。これは、react-helmetの問題だと思います。 私のスタイルをクラスに変換し、代わりにそれを使用することで私の問題は解決しました。

Googleから到着する他の人にとって、エラーは誤ったstyle呼び出しです(つまり、文字列を使用せず、オブジェクトを使用します)。

このページは役に立ちましたか?
0 / 5 - 0 評価