node.jsで作成したアプリをherokudでデプロイしようとしたところ、以下のエラーがでました。
2022-01-23T15:56:34.840963+00:00 heroku[web.1]: Starting process with command `npm start` 2022-01-23T15:56:36.374309+00:00 app[web.1]: npm ERR! missing script: start 2022-01-23T15:56:36.380171+00:00 app[web.1]: 2022-01-23T15:56:36.380395+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-01-23T15:56:36.380472+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-01-23T15_56_36_374Z-debug.log 2022-01-23T15:56:36.505440+00:00 heroku[web.1]: Process exited with status 1 2022-01-23T15:56:36.673871+00:00 heroku[web.1]: State changed from starting to crashed 2022-01-23T15:56:36.681913+00:00 heroku[web.1]: State changed from crashed to starting 2022-01-23T15:56:39.459965+00:00 heroku[web.1]: Starting process with command `npm start` 2022-01-23T15:56:41.067582+00:00 app[web.1]: npm ERR! missing script: start 2022-01-23T15:56:41.070945+00:00 app[web.1]: 2022-01-23T15:56:41.071148+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-01-23T15:56:41.071225+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-01-23T15_56_41_068Z-debug.log 2022-01-23T15:56:41.218416+00:00 heroku[web.1]: Process exited with status 1 2022-01-23T15:56:41.373281+00:00 heroku[web.1]: State changed from starting to crashed
しかしpackage.jsonには以下のようにscriptが指定されており、app.jsも存在します。
"scripts": { "start": "node ./app.js" }
なぜこのエラーが表示されるのでしょうか?
回答1件
あなたの回答
tips
プレビュー