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

前端 未结 30 2217
闹比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 17:52

    It's very simple. You can fix it in 2 easy steps.

    1. Check your environment variables if there is a key/entry with name "PORT".
    2. If found delete that entry or rename it to something else.

    It turns out that some other program is using that variable. Usually when you start react-scripts it will look for an environment variable with that title PORT.

提交回复
热议问题