Stop Create-React-App from opening a browser on npm start?

Answered
looper003 asked this question 1 year, 5 months ago
looper003 on Dec 11, 2021 · Edited

By default, Create-React-App opens a new browser window when the npm start command is executed and the application starts.

How can I stop that from happening in my application?

1 suggested answers
suparman21 on Dec 11, 2021

Update the "start" script in your package.json file to this:

"scripts": {
  "start": "BROWSER=none react-scripts start"
},

BROWSER=none tells create-react-app to not open a browser when the npm start command is run.

0 replies
Answered