9

Is there a way to change the browser in which the Expo interface (http://localhost:19002/) opens after expo start?

My default browser is Firefox, which I use for my private life. My work and coding browser is Chrome. Is there a way to tell Expo to use Chrome by default?

J. Hesters
  • 13,117
  • 31
  • 133
  • 249

2 Answers2

3

expo start looks at the BROWSER environment variable before using the default browser so you can switch to Chrome just by setting that env var before calling expo start

As a raw command it looks like this for Windows:

set BROWSER=%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe && expo start

For my workflow I have just updated package.json so the yarn run start script does it for me:

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "set BROWSER=%ProgramFiles(x86)%\\Google\\Chrome\\Application\\chrome.exe && expo start",
    ...
  },
  ...
}

David Ewen
  • 3,632
  • 1
  • 19
  • 30
-1

Most easy way is to copy your "http://localhost:19002/" and paste it in browser where you want to open your project

  • That's not an answer. The question is not how to open a link in a browser but how to set the default browser for `expo start`. – Zsolt Meszaros Jan 07 '22 at 16:12