BROWSER env variable does not work with arguments
Created by: arvigeus
Is this a bug report?
Not sure
Which terms did you search for in User Guide?
https://facebook.github.io/create-react-app/docs/advanced-configuration
Steps to Reproduce
Create a .env
file with the following content:
BROWSER=google-chrome-stable --remote-debugging-port=9222
Also tried BROWSER=google-chrome-stable, --remote-debugging-port=9222
(with a comma)
Works with BROWSER=google-chrome-stable
only
Expected Behavior
Opens Chrome
Actual Behavior
events.js:174
throw er; // Unhandled 'error' event
^
Error: spawn google-chrome-stable --remote-debugging-port=9222 ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-example-modern-redux@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-example-modern-redux@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/arvigeus/.npm/_logs/2019-06-15T04_19_29_214Z-debug.log
The terminal process terminated with exit code: 1
npm debug log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'start' ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle react-example-modern-redux@0.1.0~prestart: react-example-modern-redux@0.1.0
6 info lifecycle react-example-modern-redux@0.1.0~start: react-example-modern-redux@0.1.0
7 verbose lifecycle react-example-modern-redux@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle react-example-modern-redux@0.1.0~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/media/data/Workspace/arvigeus/react-example-modern-redux/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle react-example-modern-redux@0.1.0~start: CWD: /media/data/Workspace/arvigeus/react-example-modern-redux
10 silly lifecycle react-example-modern-redux@0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle react-example-modern-redux@0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle react-example-modern-redux@0.1.0~start: Failed to exec start script
13 verbose stack Error: react-example-modern-redux@0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid react-example-modern-redux@0.1.0
15 verbose cwd /media/data/Workspace/arvigeus/react-example-modern-redux
16 verbose Linux 4.15.0-51-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "start"
18 verbose node v10.16.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error react-example-modern-redux@0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the react-example-modern-redux@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 ]