title: How do I make my React app to open in Chrome browser by default?
body: <p>I am using <strong>create-react-app</strong> tool to develop React apps. The problem is that when I run the application using "npm start" command, it will open in Firefox browser and <strong>I want it to open in Chrome browser by default.</strong> <br/><br/>
  I found many answers providing same solution which is about <strong>modifying "start" in scripts section in package.json file</strong> but I tried it over and over with different codes and it did not work. I have no idea why all answers I read did not solve my issue. <strong>I am working in Windows 7.</strong> 
  <br/><br>
  This is my package.json code:<br/><br/></p>
  
  <pre><code>{
    "name": "jsx",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
      "react": "^16.8.6",
      "react-dom": "^16.8.6",
      "react-scripts": "3.0.1"
    },
    "scripts": {
     "start": "cross-env PORT=8080 BROWSER='Chrome' react-scripts start",
      "build": "react-scripts build",
      "test": "react-scripts test",
      "eject": "react-scripts eject"
    },
    "eslintConfig": {
      "extends": "react-app"
    },
    "browserslist": {
      "production": [
        "&gt;0.2%",
        "not dead",
        "not op_mini all"
      ],
      "development": [
        "last 1 chrome version",
        "last 1 firefox version",
        "last 1 safari version"
      ]
    }
  }
  </code></pre>
  
  <p>If I update "start" in script section in package.json, like this:</p>
  
  <pre><code>"start": "BROWSER='Chrome' react-scripts start"
  </code></pre>
  
  <p>It will not work and I get this error: <br/>
  <strong>'BROWSER' is not recognized as an internal or external command</strong><br/><br/>
  and this is the log file:</p>
  
  <pre><code>0 info it worked if it ends with ok
  1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\node.exe',
  1 verbose cli   'C:\\Program Files 
    (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
  1 verbose cli   'start' ]
  2 info using npm@6.7.0
  3 info using node@v11.11.0
  4 verbose run-script [ 'prestart', 'start', 'poststart' ]
  5 info lifecycle jsx@0.1.0~prestart: jsx@0.1.0
  6 info lifecycle jsx@0.1.0~start: jsx@0.1.0
  7 verbose lifecycle jsx@0.1.0~start: unsafe-perm in lifecycle true
  8 verbose lifecycle jsx@0.1.0~start: PATH: C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\KA\react\jsx\node_modules\.bin;C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python36\Scripts\;C:\Python36\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Windows\System32\Windows System Resource Manager\bin;C:\Windows\idmu\common;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Java\jdk1.8.0\bin;C:\ProgramData\Anaconda2;C:\ProgramData\Anaconda2\Scripts;C:\ProgramData\Anaconda2\Library\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Pandoc\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Users\KA\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\nodejs\;C:\ProgramData\chocolatey\bin;;C:\Program Files (x86)\LINQPad5;C:\Ruby22\bin;C:\Python27;C:\Python27\Scripts;C:\Users\KA\AppData\Local\atom\bin;C:\Program Files\heroku\bin;C:\Python27\Scripts\pip.exe;C:\Users\KA\AppData\Roaming\npm;C:\Users\KA\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\KA\AppData\Roaming\npm;C:\Users\KA\.dotnet\tools
  9 verbose lifecycle jsx@0.1.0~start: CWD: C:\Users\KA\react\jsx
  10 silly lifecycle jsx@0.1.0~start: Args: [ '/d /s /c', "BROWSER='Chrome' react-scripts start" ]
  11 silly lifecycle jsx@0.1.0~start: Returned: code: 1  signal: null
  12 info lifecycle jsx@0.1.0~start: Failed to exec start script
  13 verbose stack Error: jsx@0.1.0 start: `BROWSER='Chrome' react-scripts start`
  13 verbose stack Exit status 1
  13 verbose stack     at EventEmitter.&lt;anonymous&gt; (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
  13 verbose stack     at EventEmitter.emit (events.js:197:13)
  13 verbose stack     at ChildProcess.&lt;anonymous&gt; (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
  13 verbose stack     at ChildProcess.emit (events.js:197:13)
  13 verbose stack     at maybeClose (internal/child_process.js:984:16)
  13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
  14 verbose pkgid jsx@0.1.0
  15 verbose cwd C:\Users\KA\react\jsx
  16 verbose Windows_NT 6.1.7601
  17 verbose argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
  18 verbose node v11.11.0
  19 verbose npm  v6.7.0
  20 error code ELIFECYCLE
  21 error errno 1
  22 error jsx@0.1.0 start: `BROWSER='Chrome' react-scripts start`
  22 error Exit status 1
  23 error Failed at the jsx@0.1.0 start script.
  23 error This is probably not a problem with npm. There is likely additional logging output above.
  24 verbose exit [ 1, true ]
  </code></pre>