Gatsby: Error con recarga en caliente

Creado en 22 nov. 2017  ·  3Comentarios  ·  Fuente: gatsbyjs/gatsby

Steps Pasos

  1. gatsby new tutorial-part-one https://github.com/gatsbyjs/gatsby-starter-hello-world
  2. cd tutorial-part-one && gatsby develop
  3. Initial view Vista inicial

first

  1. Edit index.js in src/pages/ and save the file. Edite index.js en src/pages/ y guarde el archivo.

react

  1. View after hot reload. Ver después de la recarga en caliente.

first

Expected behavior Comportamiento esperado

Gatsby's development server should hot reload in the browser and reflect changes made in src/pages/index.js . El servidor de desarrollo de Gatsby debería recargarse en caliente en el navegador y reflejar los cambios realizados en src/pages/index.js . The view must be as below: La vista debe ser la siguiente:

second

Actual behavior Comportamiento real

No hot reloading in the browser. Sin recarga en caliente en el navegador.

Errors in console Errores en la consola

error

For changes to get reflected the browser needs to be refreshed. Para que los cambios se reflejen, es necesario actualizar el navegador.

en

Comentario más útil

It works for me when I start the server with gatsby develop --host localhost . Funciona para mí cuando inicio el servidor con gatsby develop --host localhost . This is either unexpected behavior or should be added to all tutorials that mention hot reloading with gatsby develop . Este es un comportamiento inesperado o debe agregarse a todos los tutoriales que mencionan la recarga en caliente con gatsby develop .

en

Todos 3 comentarios

It works for me when I start the server with gatsby develop --host localhost . Funciona para mí cuando inicio el servidor con gatsby develop --host localhost . This is either unexpected behavior or should be added to all tutorials that mention hot reloading with gatsby develop . Este es un comportamiento inesperado o debe agregarse a todos los tutoriales que mencionan la recarga en caliente con gatsby develop .

en

@andreasgruenh Agregar gatsby develop --host localhost no expondrá el servidor de desarrollo a la red.

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. Hola @andreasgruenh @gagan0723 , consulta https://github.com/gatsbyjs/gatsby/pull/2983#issuecomment -346126702 y https://github.com/gatsbyjs/gatsby/issues/2960#issuecomment -346130796 y comentarios más recientes . Looks like we should default to localhost on Mac as well to avoid these. Parece que también deberíamos usar localhost por defecto en Mac para evitar esto. For local network testing on Mac can do -H [machine_name].local , any of that help? Para las pruebas de red local en Mac, puede hacer -H [machine_name].local , ¿alguna de esas ayudas?

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