Node.js Port 3000 already in use but it actually isn't?

前端 未结 30 2225
闹比i
闹比i 2020-11-28 17:24

I have been working with a node.js project for a few weeks and it has been working great. Usually, I use npm start to run my app and view it in a browser on loc

30条回答
  •  伪装坚强ぢ
    2020-11-28 18:14

    Came from Google here with a solution for High Sierra.

    Something changed in the networking setup of macos and some apps (including ping) cannot resolve localhost.

    Editing /etc/hosts seems like a fix:

    cmd: sudo nano /etc/hosts/ content 127.0.0.1 localhost

    Or simply (if you're sure your /etc/hosts is empty) sudo echo '127.0.0.1 localhost' > /etc/hosts

提交回复
热议问题