简体   繁体   中英

Deploying a Node.js app using Heroku - start script

I'm quite puzzled as to why my app is crashing when deployed to Heroku.

The error is

Failed at the ev@1.0.0 start script. 

Where my start script is

"start": "node app.js"

because app.js is where it is all initialised (in the same place as package.json, of course).

My app works perfectly fine locally, ie it starts app.js and successfully runs, so what could be causing this issue remotely?

You must sure that you write "start": "node app.js" inside the script. Because Heroku Read this Scripts to start the nodejs Server ie

"scripts": {
"start":"node app.js" 
"test": "echo \"Error: no test specified\" && exit 1"  }

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