Gatsby: WebpackError: انتهاك ثابت: خطأ رد فعل مصغر # 62

تم إنشاؤها على ٢٦ يناير ٢٠١٩  ·  1تعليق  ·  مصدر: gatsbyjs/gatsby

لتسهيل مساعدتك ، يرجى تضمين أكبر قدر ممكن من المعلومات المفيدة. روابط مفيدة: - التوثيق: https://www.gatsbyjs.org/docs/ لدى Gatsby العديد من قنوات دعم المجتمع ، حاول طرح سؤالك على: - Discord: https://gatsby.app/discord - Spectrum: https: // range.chat/gatsby-js - Twitter: https://twitter.com/gatsbyjs قبل فتح إصدار جديد ، يرجى البحث في المشكلات الحالية https://github.com/gatsbyjs/gatsby/issues

ملخص

Gatsby build يطرح خطأ WebpackError: 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 .

البيئة (إذا كانت ذات صلة)

""
نظام:
نظام التشغيل: macOS 10.14.2
وحدة المعالجة المركزية: (8) x64 Intel (R) Core (TM) i7-4750HQ CPU @ 2.00GHz
شل: 3.2.57 - / بن / باش
الثنائيات:
العقدة: 11.7.0 - / usr / local / bin / node
الغزل: 1.13.0 - / usr / local / bin / yarn
npm: 6.5.0 - / usr / local / bin / npm
اللغات:
بايثون: 2.7.10 - / usr / bin / python
المتصفحات:
الكروم: 71.0.3578.98
سفاري: 12.0.2
الحزم:
غاتسبي: ^ 2.0.76 => 2.0.76
صورة 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-response-helmet: ^ 3.0.2 => 3.0.5
gatsby-plugin-sharp: ^ 2.0.14 => 2.0.16
نظام ملفات جاتسبي المصدر: ^ 2.0.8 => 2.0.12
محول غاتسبي شارب: ^ 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 ،
روابط اجتماعية: [
{
الاسم: 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 ،
الاسم المختصر: starter ،
start_url: / ،
background_color: #663399 ،
theme_color: #663399 ،
عرض: minimal-ui ،
icon: src/images/gatsby-icon.png ، // هذا المسار متعلق بجذر الموقع.
} ،
} ،
// هذا المكون الإضافي (اختياري) يمكّن تطبيق الويب التقدمي + وظائف دون اتصال بالإنترنت
// لمعرفة المزيد ، قم بزيارة: https://gatsby.app/offline
// "gatsby-plugin-offline" ،
] ،
}

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

{
"الاسم": "gatsby-starter-default"،
"خاص": صحيح ،
"description": "بداية بسيطة للنهوض والتطور بسرعة مع Gatsby" ،
"الإصدار": "0.1.0"،
"المؤلف": "كايل ماثيوز [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"،
"أنواع العناصر": "^ 15.6.2"،
"رد فعل": "^ 16.6.3"،
"رد فعل دوم": "^ 16.6.3"،
"خوذة التفاعل": "^ 5.2.0"
} ،
"الكلمات الدالة": [
"غاتسبي"
] ،
"ترخيص": "MIT" ،
"نصوص": {
"بناء": "بناء غاتسبي"،
"تطوير": "تطوير غاتسبي" ،
"ابدأ": "npm run development"،
"format": "أجمل - اكتب \" src / * / .js \ ""،
"اختبار": "صدى \" اكتب الاختبارات! -> 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 /> الذي تم إنشاؤه تلقائيًا. استخدام كائن نمط لم يكن يعمل ، والذي أتخيل أنه مشكلة في خوذة التفاعل. أدى تحويل أسلوبي إلى فصل دراسي واستخدامه بدلاً من ذلك إلى حل مشكلتي.

بالنسبة للأشخاص الآخرين الذين يصلون عن طريق Google ، فإن الخطأ هو استدعاء غير صحيح style (على سبيل المثال ، لا تستخدم سلاسل ، استخدم كائنات).

>كل التعليقات

~ AlexanderProd أواجه نفس المشكلة ؛ ماذا كان سبب لك؟ ~

لا تهتم ، في حالتي ، كنت أستخدم

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

داخل مثيل SEO.js <Helmet /> الذي تم إنشاؤه تلقائيًا. استخدام كائن نمط لم يكن يعمل ، والذي أتخيل أنه مشكلة في خوذة التفاعل. أدى تحويل أسلوبي إلى فصل دراسي واستخدامه بدلاً من ذلك إلى حل مشكلتي.

بالنسبة للأشخاص الآخرين الذين يصلون عن طريق Google ، فإن الخطأ هو استدعاء غير صحيح style (على سبيل المثال ، لا تستخدم سلاسل ، استخدم كائنات).

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات