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

Automatically open browser to netlify dev port on netlify dev #608

Closed
DavidWells opened this issue Nov 8, 2019 · 1 comment · Fixed by #612
Closed

Automatically open browser to netlify dev port on netlify dev #608

DavidWells opened this issue Nov 8, 2019 · 1 comment · Fixed by #612

Comments

@DavidWells
Copy link
Contributor

Many users internal & external have reported issues with running netlify dev where the logs saying where the netlify dev server is running disappears.

This leaves the user in a state where they cannot proceed and open/dev their app.

This has been seen effecting create react app & gatsby projects.

- What is the current behavior?

There is a log message that gets erased by certain tools (CRA/Gatsby)

This leaves the users wondering where the netlify dev app is actually running

- If the current behavior is a bug, please provide the steps to reproduce.

- What is the expected behavior?

Automatically open the default browser (and re-use tab if one already is open). This is the behavior of create react app and its a nice DX.

So:

  1. Print the message "Netlify dev is now running on port:whatever"
  2. Then automatically open the dev app in the default browser
@rlfrahm
Copy link

rlfrahm commented Jan 10, 2020

This is the top result on Google when looking to disable this behavior so posting solution to disable here. I ended up holding my version for a while until I finally found that you could just add autoLaunch = false to [dev] in netlify.toml.

Like so:

[dev]
  autoLaunch = false

Reference: https://github.com/netlify/cli/blob/master/docs/netlify-dev.md#netlifytoml-dev-block

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

Successfully merging a pull request may close this issue.

2 participants