Home reactjs Running the react application, the console reports: Local: at: http: // localhost:...

Running the react application, the console reports: Local: at: http: // localhost: 3000. Not working: Your Network: http: //192.168 x.xxxx: yyyy

Author

Date

Category

react
After launching NPM Start
The terminal proposes to follow the application at the main address:

Local: http: // localhost: 3000.

and on any devices in this local network at the address type:

on your network: http: //192.168.1.246:3000

The second part may not work in some local networks.

How to achieve what would it work?


Answer 1

In the terminal, execute the command:

webpack-dev-server --port 3000 --hot --Host 0.0.0.0

If it is proposed to put something, agree.

otherwise
NPM Install --Save-DeV WebPack-CLI
Or.
Yarn Add WebPack-Cli --Dev
Will Install IT.

If after the installation will offer

npm audit fix

Perform this too.

Now everything works.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions