Gatsby: خطأ في إعادة التحميل السريع

تم إنشاؤها على ٢٢ نوفمبر ٢٠١٧  ·  3تعليقات  ·  مصدر: gatsbyjs/gatsby

Steps خطوات

  1. gatsby new tutorial-part-one https://github.com/gatsbyjs/gatsby-starter-hello-world
  2. cd tutorial-part-one && gatsby develop
  3. Initial view العرض الأولي

first

  1. Edit index.js in src/pages/ and save the file. قم بتحرير index.js في src/pages/ واحفظ الملف.

react

  1. View after hot reload. عرض بعد إعادة التحميل الساخن.

first

Expected behavior سلوك متوقع

Gatsby's development server should hot reload in the browser and reflect changes made in src/pages/index.js . يجب أن يقوم خادم تطوير Gatsby بإعادة التحميل في المتصفح ويعكس التغييرات التي تم إجراؤها في src/pages/index.js . The view must be as below: يجب أن يكون العرض على النحو التالي:

second

Actual behavior السلوك الفعلي

No hot reloading in the browser. لا يوجد إعادة تحميل ساخنة في المتصفح.

Errors in console أخطاء في وحدة التحكم

error

For changes to get reflected the browser needs to be refreshed. لكي تنعكس التغييرات ، يجب تحديث المتصفح.

en

التعليق الأكثر فائدة

It works for me when I start the server with gatsby develop --host localhost . إنه يعمل معي عندما أبدأ الخادم بـ gatsby develop --host localhost . This is either unexpected behavior or should be added to all tutorials that mention hot reloading with gatsby develop . هذا إما سلوك غير متوقع أو يجب إضافته إلى كافة البرامج التعليمية التي تذكر إعادة التحميل السريع باستخدام gatsby develop .

en

ال 3 كومينتر

It works for me when I start the server with gatsby develop --host localhost . إنه يعمل معي عندما أبدأ الخادم بـ gatsby develop --host localhost . This is either unexpected behavior or should be added to all tutorials that mention hot reloading with gatsby develop . هذا إما سلوك غير متوقع أو يجب إضافته إلى كافة البرامج التعليمية التي تذكر إعادة التحميل السريع باستخدام gatsby develop .

en

andreasgruenh لن تؤدي إضافة gatsby develop --host localhost إلى كشف خادم التطوير على الشبكة.

en

Hi @andreasgruenh @gagan0723 please see https://github.com/gatsbyjs/gatsby/pull/2983#issuecomment -346126702 and https://github.com/gatsbyjs/gatsby/issues/2960#issuecomment -346130796 and more recent comments. مرحبًا andreasgruenh @ gagan0723 ، يرجى الاطلاع على https://github.com/gatsbyjs/gatsby/pull/2983#issuecomment -346126702 و https://github.com/gatsbyjs/gatsby/issues/2960#issuecomment -346130796 والمزيد من التعليقات الأخيرة . Looks like we should default to localhost on Mac as well to avoid these. يبدو أنه يجب علينا الإعداد الافتراضي إلى localhost على نظام Mac أيضًا لتجنب ذلك. For local network testing on Mac can do -H [machine_name].local , any of that help? لاختبار الشبكة المحلية على نظام التشغيل Mac ، هل يمكن أن تفعل -H [machine_name].local ، أي من هذه المساعدة؟

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

القضايا ذات الصلة

dustinhorton picture dustinhorton  ·  3تعليقات

jimfilippou picture jimfilippou  ·  3تعليقات

benstr picture benstr  ·  3تعليقات

mikestopcontinues picture mikestopcontinues  ·  3تعليقات

3CordGuy picture 3CordGuy  ·  3تعليقات