[SOLVED] Why isn’t npm start not building and connecting to the dev server?


This Content is from Stack Overflow. Question asked by James Goodwin

I’m trying to work my way through a React course and I am consistently running into the same issue. Every time I use npm start after I’ve created the app I get this error in the browser: This site can’t be reached. Localhost took too long to respond or I get the error that it refused to connect.

Here’s everything I’ve tried to remedy the issue:

  • I’m not getting any errors in VScode’s built in terminal or my laptop’s terminal, it says everything compiled successfully.

  • I’ve tried opening the dev server on multiple different browsers: Brave, Chrome, Firefox.

  • I’ve created multiple different projects & all are having the same issue.

  • I’ve changed the port the dev server opens up on in VScode.

  • I’ve cleared my node cache.

  • I’ve uninstalled & reinstalled node & npm.

  • I’ve restarted my laptop multiple times

  • I’ve uninstalled & reinstalled VScode.

  • I even went so far as to completely factory reset my laptop & reinstall everything. It fixed the problem for a couple of days but now I’m back at square one dealing with the same issue.

My laptop is a 2017 MBP 13 running macOS Monterey. Any help / advice would be greatly appreciated.

Screenshot of package.json file

Screenshot of the response after entering npm start


I finally figured out the solution. I had to turn off my VPN for the npm start command to work.

This Question was asked in StackOverflow by James Goodwin and Answered by James Goodwin It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?