question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Quitting react dev server closes browser and any open tabs

See original GitHub issue

This only occurs if create-react-app creates the browser process itself. See info below.

Environment

  1. node -v: v6.11.3

  2. npm -v:5.4.1

  3. yarn --version (if you use Yarn):

  4. npm ls react-scripts (if you haven’t ejected): react-scripts@1.0.12

  5. Operating system: Ubuntu 16.04

  6. Browser and version (if relevant): Chromium 60.0.3112.113

Steps to Reproduce

  1. Without a browser open, run npm run start in a repo created with create-react-app
  2. Open a few tabs in the browser created by that command.
  3. Ctrl-C the react server.

Expected Behavior

The browser remains open. Or maybe gives a confirm dialog, then closes.

Actual Behavior

The browser closes, losing my open tabs.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
GAumalacommented, Oct 3, 2017

I think the easiest workaround is to have your browser up and running well before starting the dev server.

If the browser is an independent process, it won’t be closed when the dev server is interrupted.

0reactions
tomByrercommented, Feb 26, 2019

I do not see this in Win10, Firefox, & bash in VSCode.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React app stuck on "Starting the development server"
I have a react project that I want to convert to Typescript and I started as you noted with the "create-react-app", added all...
Read more >
How to Stop a React App from Running in Windows
It is running in a browser, but closing the browser does not stop the app: · To stop this from running, in the...
Read more >
React App Not Working? 4 Quick Debugging Tips - Dave Ceddia
Check the Network tab - Still got that console open? Click the Network tab and make sure there are no errors. It may...
Read more >
webpack-dev-server - npm
Start using webpack-dev-server in your project by running `npm i webpack-dev-server`. ... --no-open Does not open the default browser.
Read more >
Fix "Aw, Snap!" page crashes and other page loading errors
On your Android phone or tablet, open the Chrome app Chrome . · Tap More More and then New Incognito tab. · In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found