简体   繁体   English

我在 heroku (node.js) 上部署我的应用程序时遇到问题

[英]i am having a problem deploying my app on heroku (node.js)

hi i am getting a problem while trying to deploy my app on heruko the following error嗨,我在尝试在 heruko 上部署我的应用程序时遇到问题,出现以下错误

and my Procfile looks like web: npm start我的 Procfile 看起来像 web: npm start

2019-10-25T03:31:44.445209+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=andela-api.herokuapp.com request_id=ee3f68c6-e7a5-4212-8277-bddd8a33027c fwd="41.186.25.0" dyno= connect= service= status=503 bytes= protocol=https```

Favicon file is an image file(usually website logo) that you see on the browser tab. Favicon 文件是您在浏览器选项卡上看到的图像文件(通常是网站徽标)。 It has extension .ico .它有扩展名.ico Your project cannot find that file.您的项目找不到该文件。

  1. If you do not have favicon.ico file in your project, then create one and upload it at suitable location(make sure it's accessible via url /favicon.ico ).如果您的项目中没有favicon.ico文件,请创建一个并将其上传到合适的位置(确保可以通过 url /favicon.ico访问它)。
  2. If you have favicon file in your project, the problem is related to permission to access the file via /favicon.ico (make sure the folder where you have the file stored is public so that it can be access via url /favicon.ico )如果您的项目中有 favicon 文件,则问题与通过/favicon.ico访问文件的权限有关(确保存储文件的文件夹是公共的,以便可以通过 url /favicon.ico访问)

How to create favicon file?如何创建网站图标文件? Use favicon generator site such this one .使用 favicon 生成器站点,例如这个 Upload your logo file and download the favicon generated by the site.上传您的徽标文件并下载网站生成的网站图标。

I had react app and after deploying to heroku I got the same error.我有反应应用程序,部署到 heroku 后,我得到了同样的错误。 The reason of this, I deleted favicon.ico and manifest.json files in public folder.为此,我删除了公用文件夹中的 favicon.ico 和 manifest.json 文件。 After adding favicon.ico and manifest.json files in public folder, the error solved.在 public 文件夹中添加 favicon.ico 和 manifest.json 文件后,错误解决。

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

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