How do I open react app with Firefox on macOS Ventura?

I’m following the tutorial to install developer tools but having trouble getting my react app to open in a browser other than the system default.

I’d like it to open in firefox but no matter what I put in the package.json file under scripts, it doesn’t seem to work. It always always always opens in Safari.

I’ve tried
In package.json scripts

"start": "BROWSER=firefox react-scripts start",
"start": "BROWSER=Firefox react-scripts start",
"start": "BROWSER='firefox' react-scripts start",
"start": "BROWSER='Firefox' react-scripts start",
"start": "BROWSER='Applications/Firefox.app' react-scripts start",
"start": "BROWSER=Applications/Firefox.app react-scripts start",
"start": "BROWSER='Firefox Developer Edition' react-scripts start",
"start": "BROWSER='firefox developer edition' react-scripts start",

giving up on firefox I also tried

"start": "BROWSER=brave react-scripts start",
"start": "BROWSER=brave-browser react-scripts start",
"start": "BROWSER='brave-browser' react-scripts start",
"start": "BROWSER=chromium react-scripts start",

I tried adding firefox as a script
"

firefox": "Browser=firefox react-scripts start"

then running
npm run firefox
and tried that with all the different permutations and versions above.

I’ve also tried all the different versions above as an argument from the terminal like
BROWSER=firefox npm start

Nothing seems to work. I can’t open it with Firefox, Chrome, or Brave, ONLY Safari and I’m pretty much stuck since Safari is the only browser that doesn’t seem to have a react developer tools extension for it.

Hi, I haven’t installed Ventura yet, so just for my understanding as I assume that it doesn’t make much of a difference whether you run the React app on Monterey or Ventura:
What are / are there objections against either copying the URL localhost:{YOURPORTNUMBER} and pasting it into the browser of your choice or changing your default browser to the one you’re debugging with? npm start opens the app in your default browser. I don’t think that changing the package.json has any impact on that.

I didn’t know I could open the port in the browser directly. That actually works well since I can set BROWSER=none in the package.json file and keep it from opening a new browser tab, and setting it to none actually works.

1 Like