Localhost unexpectedly closed the connection

Hey @herbg9900,

Re the port change, it sounds like you already have something running on port 3000 and so Browsersync isn’t able to use the port to proxy your dev site. Browsersync will automatically increment the port number if it detects that the one specified by its config is in use.

Check your running processes to see if you already have a Browsersync session going (it could be lingering from a shell that you closed)–it will probably just show up as “node” in the list of processes. On Linux/Mac/WSL, you can run ps -e | grep node.

That’s presumably also why the first session can’t connect to your site–the port is already bound to something else. It’s strange that it takes two runs for Browsersync to figure that out and adapt, though. I might head over to that project and see if you can find any similar reports.