使用create-react-app时的something is already running on port 3000

问题:

自己今天在使用create-react-app搭建react应用的时候,开启了两个React app,然后npm start的时候,出现something is already running on port 3000

解决方法

自己之前也遇到过这个问题,但是没有记录下来,我自己试着想,先是npm start port=3001,结果还是不对。
正确的打开方式应该是PORT=3001 npm start(这个端口只要不和3000相同就行) .

总结一下,以免自己以后好查阅。也分享给遇到这个问题的小伙伴哟

原文地址:https://www.cnblogs.com/sminocence/p/8353542.html