Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing a bad HOST causes the port check to fail #2179

Closed
gaearon opened this issue May 16, 2017 · 0 comments
Closed

Passing a bad HOST causes the port check to fail #2179

gaearon opened this issue May 16, 2017 · 0 comments
Milestone

Comments

@gaearon
Copy link
Contributor

gaearon commented May 16, 2017

The failure doesn't look great:

env HOST=nono npm start

? Something is already running on port 3000.
Would you like to run the app on another port instead? (Y/n) 

/Users/gaearon/p/create-react-app/packages/react-scripts/scripts/start.js:17
  throw err;
  ^

RangeError: "port" argument must be >= 0 and < 65536
    at assertPort (internal/net.js:17:11)
    at Server.listen (net.js:1382:5)
    at Server.listen (/Users/gaearon/p/create-react-app/packages/react-scripts/node_modules/webpack-dev-server/lib/Server.js:431:47)
    at run (/Users/gaearon/p/create-react-app/packages/react-scripts/scripts/start.js:133:13)
    at inquirer.prompt.then.answer (/Users/gaearon/p/create-react-app/packages/react-scripts/scripts/start.js:171:9)

We should handle the case with undefined port properly and show a better message (or should the Promise have been rejected?)

@gaearon gaearon added this to the 1.0.1 milestone May 16, 2017
@gaearon gaearon modified the milestones: 1.0.1, 1.0.0 May 19, 2017
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant