Skip to content
GitLab
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
  • #9119
Closed
Open
Issue created Jun 06, 2020 by Administrator@rootContributor

Wrong HOST is shown in the console

Created by: Bessonov

Describe the bug

$ cat .env 
BROWSER=false
PORT=8080
HOST=0.0.0.0
SKIP_PREFLIGHT_CHECK=true

$ cat package.json | grep react-scripts
                "react-scripts": "3.4.1",

After start it still shows localhost:

Starting the development server...
Compiled successfully!
You can now view test in the browser.
  Local:            http://localhost:8080
  On Your Network:  http://172.30.0.6:8080
Note that the development build is not optimized.
To create a production build, use npm run build.

Did you try recovering your dependencies?

No.

Which terms did you search for in User Guide?

https://github.com/facebook/create-react-app/issues?q=%22On+Your+Network%3A%22+host

Environment

Environment Info:

  current version of create-react-app: 3.4.1
  running from /home/redacted/.npm/_npx/18523/pnpm-global/4/node_modules/.pnpm/create-react-app@3.4.1/node_modules/create-react-app

  System:
    OS: Linux 4.15 Ubuntu 18.04.3 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz
  Binaries:
    Node: 12.17.0 - ~/.nvm/versions/node/v12.17.0/bin/node
    Yarn: 1.22.4 - ~/.yvm/shim/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v12.17.0/bin/npm
  Browsers:
    Chrome: 81.0.4044.138
    Firefox: Not Found
  npmPackages:
    react: 16.13.1 => 16.13.1 
    react-dom: 16.13.1 => 16.13.1 
    react-scripts: 3.4.1 => 3.4.1 
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

(Write your steps here:)

Expected behavior

It shows 0.0.0.0:

Starting the development server...
Compiled successfully!
You can now view test in the browser.
  Local:            http://0.0.0.0:8080
  On Your Network:  http://172.30.0.6:8080
Note that the development build is not optimized.
To create a production build, use npm run build.

Actual behavior

It shows always localhost.

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Assignee
Assign to
Time tracking