简体   繁体   English

create-react-app不提供样板应用

[英]create-react-app does not serve boilerplate app

I haven't made any changes, I just run "create-react-app client", then everything runs correctly, I cd into the directory and run "yarn start". 我没有做任何更改,我只运行“ create-react-app client”,然后一切正常运行,我进入目录并运行“ yarn start”。 Then I have two problems: 1) It says "Something is already running on port 3000". 然后,我有两个问题:1)它说“端口3000上已经有东西在运行”。 Unfortunately when I use lsof and netstat, nothing is running on port 3000. I say to run on a different port, and it then attempts to serve the app. 不幸的是,当我使用lsof和netstat时,端口3000上没有任何运行。我说要在其他端口上运行,然后它尝试为该应用程序提供服务。 2) Nothing is served on the new port. 2)在新端口上没有任何服务。 The browser opens up, the console gives no errors, but nothing gets served to the browser. 浏览器打开,控制台没有错误,但是没有任何内容提供给浏览器。

node version 8.7.0 yarn version 1.3.2 create-react-app version 1.3.3 OS MacOS 节点版本8.7.0毛线版本1.3.2 create-react-app版本1.3.3 OS MacOS

My hosts file was empty, so "localhost" didn't mean anything. 我的主机文件为空,因此“ localhost”没有任何意义。 127.0.0.1 localhost fixed it. 127.0.0.1 localhost修复了它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM