简体   繁体   English

在 Google App Engine 上反应应用程序崩溃循环

[英]React app crash loop on Google App Engine

I just deployed the frontend of my app to app engine.我刚刚将我的应用程序的前端部署到了应用程序引擎。 I created this frontend with create-react-app and it worked perfectly locally.我使用 create-react-app 创建了这个前端,它在本地运行良好。

When I deploy it to App Engine with gcloud app deploy app.yaml , I get the following logs which keep on repeating.当我使用gcloud app deploy app.yaml将其部署到 App Engine 时,我得到以下不断重复的日志。

I am not sure where the error lies;我不确定错误在哪里; the favicon is in the public directory. favicon 位于公共目录中。 Any help would be greatly appreciated.任何帮助将不胜感激。

日志

/favicon.ico is often handled by declaring it as a static file in app.yaml . /favicon.ico通常通过在app.yaml其声明为 static 文件来处理。 As a suggestion, you can review this stackoverflow question.作为建议,您可以查看此stackoverflow问题。

Also, searching for similar situations like yours, it is also recommended to clean your browser cache.另外,搜索和你类似的情况,也建议清理一下浏览器缓存。

In the above case, my app wasn't able to locate some files.在上述情况下,我的应用无法找到某些文件。 I used create-react-app and found the following documentation link solved my issue.我使用了create-react-app并发现以下文档链接解决了我的问题。

  • This is down to the proxy I used to connect the above frontend to a backend in development in package.json这取决于我用来将上述前端连接到package.json开发中的后端的代理
  • This proxy doesn't work in production, and is just a convenience to avoid CORS.此代理在生产中不起作用,只是为了避免 CORS 的方便。 Deleting it solved the issue删除它解决了问题

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

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