简体   繁体   中英

Node.js Heroku deploy error 503

I am trying to deploy a Node.js application to Heroku via a Github repo. It is successfully building the app, but when it deploys there is an Application Error -- and the console reports a 503 error

"Failed to load resource: the server responded with a status 503(Service unavailable)"

The resource it is looking for is a "favicon.ico" file. I tried putting it in the root directory, in a ./public folder, and inside a ./static folder inside app/.

This is strange because I wasn't attempting to reference this file at all in my initial deployment (this is for a class project, and I am trying to set stuff up) and this error still occurred then. I am feeling like Heroku is expecting this file to be somewhere else, but I can't find any sort of mold or pattern to where its expecting this favicon to be. Can anyone point me in the right direction? Regards.

first check start in packege.json if you use nodemon change nodemon to node and add node engine in packege.json file.

"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node index.js"
},
"engines": {
    "node": "12.19.0"
},

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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