我使用“ npx create-react-app testreact”创建了一个React项目。从PC上的浏览器进行测试时,服务器返回空白页,而不是预期的单词-“ Learn React”。
这里发生了什么?如何解决?
Cmd顺序
环境信息nodejs:v13.2.0npm:6.13.1系统:18.04.1-Ubuntu反向代理服务器:nginx
代码信息回购:https://github.com/nautilusshell/testreact.git有一个名为“ node_modules”的文件夹,它是由“ npm install”创建的,我没有放入上面的仓库中,因为它太大了,不需要上传。
顺便说一下,实际上我什么都没改变。
错误信息造访http://52.130.83.55/image_editing从浏览器我得到:
状态等于404的.js文件全部位于http://52.130.83.55/static/js/xxx.js。
例如,未找到http://52.130.83.55/static/js/bundle.js。
Nginx Config回购:https://github.com/nautilusshell/nginx_config.git