Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React application not working on local network

I'm trying to access my application on my phone by running it on my local network. When starting the React app there are two urls. One is localhost and the other one on my network.

enter image description here

I can access the application with the On Your Network URL when using the device that I'm running the app on, however, the problem is that I can't access it from any other device.

I tried to change the port, aswell as running: npm start --port 3000 --host 0.0.0.0 (with 0.0.0.0 being my ip address).

I get an error saying:

This site can't be reached. 0.0.0.0 (with 0.0.0.0 again being my ip address) took to long to respond.

like image 991
Marcus Avatar asked Apr 02 '26 04:04

Marcus


1 Answers

In my case the problem was solved by disabling McAfee firewall and opening windows start. Searching control panel and opening it. Then in the upper left corner search for firewall and click on Allow an app through Windows Firewall. Then click change settings and enable Node.js JavaScript Runtime on both private and public.

like image 121
Marcus Avatar answered Apr 03 '26 23:04

Marcus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!