Gatsby: Erro ao recarregar a quente

Criado em 22 nov. 2017  ·  3Comentários  ·  Fonte: gatsbyjs/gatsby

Steps Passos

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

first

  1. Edit index.js in src/pages/ and save the file. Edite index.js em src/pages/ e salve o arquivo.

react

  1. View after hot reload. Visualização após recarga a quente.

first

Expected behavior Comportamento esperado

Gatsby's development server should hot reload in the browser and reflect changes made in src/pages/index.js . O servidor de desenvolvimento do Gatsby deve recarregar a quente no navegador e refletir as alterações feitas em src/pages/index.js . The view must be as below: A visualização deve ser como abaixo:

second

Actual behavior Comportamento real

No hot reloading in the browser. Sem recarga a quente no navegador.

Errors in console Erros no console

error

For changes to get reflected the browser needs to be refreshed. Para que as alterações sejam refletidas, o navegador precisa ser atualizado.

en

Comentários muito úteis

It works for me when I start the server with gatsby develop --host localhost . Funciona para mim quando inicio o servidor com gatsby develop --host localhost . This is either unexpected behavior or should be added to all tutorials that mention hot reloading with gatsby develop . Este é um comportamento inesperado ou deve ser adicionado a todos os tutoriais que mencionam o recarregamento a quente com gatsby develop .

en

Todos 3 comentários

It works for me when I start the server with gatsby develop --host localhost . Funciona para mim quando inicio o servidor com gatsby develop --host localhost . This is either unexpected behavior or should be added to all tutorials that mention hot reloading with gatsby develop . Este é um comportamento inesperado ou deve ser adicionado a todos os tutoriais que mencionam o recarregamento a quente com gatsby develop .

en

@andreasgruenh Adicionar gatsby develop --host localhost não exporá o servidor de desenvolvimento à rede.

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. Olá @andreasgruenh @gagan0723 , consulte https://github.com/gatsbyjs/gatsby/pull/2983#issuecomment -346126702 e https://github.com/gatsbyjs/gatsby/issues/2960#issuecomment -346130796 e comentários mais recentes . Looks like we should default to localhost on Mac as well to avoid these. Parece que também devemos usar localhost no Mac para evitar isso. For local network testing on Mac can do -H [machine_name].local , any of that help? Para testes de rede local no Mac pode fazer -H [machine_name].local , isso ajuda?

en
Esta página foi útil?
0 / 5 - 0 avaliações

Questões relacionadas

magicly picture magicly  ·  3Comentários

dustinhorton picture dustinhorton  ·  3Comentários

ghost picture ghost  ·  3Comentários

jaanhio picture jaanhio  ·  3Comentários

rossPatton picture rossPatton  ·  3Comentários