Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #7226
Something went wrong while setting issue due date.
Closed
Open
Issue created 6 years ago by Administrator@rootContributor
  • New related issue

  • Report abuse to administrator

  • New related issue

  • Report abuse to administrator

BROWSER env variable does not work with arguments

Closed

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 ]

Related issues

#1974 (closed), #2510 (closed)

  1. Oh no!

    You are trying to upload something other than an image. Please upload a .png, .jpg, .jpeg, .gif, .bmp, .tiff or .ico.

    Incoming!

    Drop your designs to start your upload.
Tasks
0
server returned results with length 1, expected length of 9

Linked items
0

Link issues together to show that they're related. Learn more.

Activity


  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: miraage

    Have you tried BROWSER="google-chrome-stable --remote-debugging-port=9222" ? // edit It might not work due to https://github.com/sindresorhus/open/blob/master/index.js#L32, because CRA sends a string

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: arvigeus

    Still the same

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: miraage

    @arvigeus I'd suggest you to open a proposal issue to add a new environment variable (e.g. BROWSER_OPTIONS) which will be passed to open package

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: mrmckeb

    Hi @arvigeus, as @miraage said, we'd welcome a PR here if you'd like to take a look into it!

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: arvigeus

    Definitely I would like to give it a shot! I don't know how to test it though. Any docs on that? I think I have to edit react-scripts package directly

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: mrmckeb

    Yes, that's correct @arvigeus. This project is actually relatively easy to work with, but we're here to help!

    I think you'll need to add the variable to react-scripts, and pass it through to open here: https://github.com/facebook/create-react-app/blob/master/packages/react-dev-utils/openBrowser.js

    You'll also need to add some documentation, but that's the easiest part ;)

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: arvigeus

    Made a PR yesterday. It has one test failing for no reason, and I can't figure why....

  • Administrator
    Administrator @root · 6 years ago
    Author Contributor

    Created by: mrmckeb

    I'll check it out ;)

Please register or sign in to reply
0 Assignees
None
Assign to
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
Due date
None
None
None
Time tracking
No estimate or time spent
Confidentiality
Not confidential
Not confidential

You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

Lock issue
Unlocked
1
1 participant
Administrator
Reference:

Menu

Explore Projects Groups Snippets