Create-react-app: How to solve when the npm start, the ip is not localhost, and can not access the view?

Created on 10 Sep 2020  路  6Comments  路  Source: facebook/create-react-app

Compiled successfully!

You can now view my-app in the browser.

http://x86_64-apple-darwin13.4.0:3000

Note that the development build is not optimized.
To create a production build, use npm run build.

Mac OS
node: v14.9.0
npm: 6.14.7

needs triage

Most helpful comment

typing unset HOST in the cmd line worked for me!

All 6 comments

I have the same problem!
I have tried deleting node_modules and doing "npm install" --> didn't help.
I uninstalled the node and reinstalled it --> didn't help

Would appreciate suggestions.

Same problem for me

Compiled successfully!

You can now view my-app in the browser.

http://x86_64-apple-darwin13.4.0:3000

Note that the development build is not optimized.
To create a production build, use yarn build.

but it work on another mac with same catalina 10.15.6 ...

this is so wire

Met the same problem on MacOS Catalina 10.15.6

Found the solution at https://medium.com/@choy/fixing-create-react-app-when-npm-fails-to-start-because-your-host-environment-variable-is-being-4c8a9fa0b461:

  1. Add "export HOST=localhost" to ~/.bash_profile
  2. source ~/.bash_profile

typing unset HOST in the cmd line worked for me!

Found the solution at https://medium.com/@choy/fixing-create-react-app-when-npm-fails-to-start-because-your-host-environment-variable-is-being-4c8a9fa0b461:

  1. Add "export HOST=localhost" to ~/.bash_profile
  2. source ~/.bash_profile

I have solved the problem based on this answer. Thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adrice727 picture adrice727  路  3Comments

fson picture fson  路  3Comments

onelson picture onelson  路  3Comments

alleroux picture alleroux  路  3Comments

Evan-GK picture Evan-GK  路  3Comments