Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with hot reloading #2989

Closed
totsteps opened this issue Nov 22, 2017 · 3 comments
Closed

Error with hot reloading #2989

totsteps opened this issue Nov 22, 2017 · 3 comments
Assignees

Comments

@totsteps
Copy link

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.

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. 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.

@andrewgreenh
Copy link

It works for me when I start the server with gatsby develop --host localhost. This is either unexpected behavior or should be added to all tutorials that mention hot reloading with gatsby develop.

@totsteps
Copy link
Author

@andreasgruenh Adding gatsby develop --host localhost will not expose development server to the network.

@rdela
Copy link
Contributor

rdela commented Nov 27, 2017

Hi @andreasgruenh @gagan0723 please see #2983 (comment) and #2960 (comment) and more recent comments. Looks like we should default to localhost on Mac as well to avoid these. For local network testing on Mac can do -H [machine_name].local, any of that help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants