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

时间:2018-01-26 00:28:43   收藏:0   阅读:1550

问题:

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

解决方法

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

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

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!