質問編集履歴

1

エラーメッセージとpackage.jsonをコード表記にしました。エラーメッセージは前後の部分を追記しました。Procfileの内容を加えました。

2022/06/19 12:00

投稿

sawayat
sawayat

スコア0

test CHANGED
File without changes
test CHANGED
@@ -1,13 +1,23 @@
1
- express-generatorを使ってNode.jsのアプリを作り、Herokuにデプロイしようとしています。
1
+ express-generatorを使ってNode.jsのアプリを作り、Herokuにデプロイしようとしています。PCはwindows10を使っています。
2
+
2
3
  Herokuのアドオンでmysqlを接続してあります。
3
4
  ビルドでは成功しますが、アプリを開こうとすると、アプリケーションエラーになります。
5
+
4
6
  エラーメッセージは
5
- 2022-06-19T10:04:40.385827+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=以下省略
6
- 2022-06-19T10:04:41.184584+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=以下省略
7
-
7
+ ```
8
+ 2022-06-19T11:34:14.307987+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT
9
+ within 60 seconds of launch
10
+ 2022-06-19T11:34:14.346570+00:00 heroku[web.1]: Stopping process with SIGKILL
11
+ 2022-06-19T11:34:14.369235+00:00 app[web.1]: Error waiting for process to terminate: No child processes
12
+ 2022-06-19T11:34:14.473851+00:00 heroku[web.1]: Process exited with status 22
13
+ 2022-06-19T11:34:14.608452+00:00 heroku[web.1]: State changed from starting to crashed
14
+ 2022-06-19T11:34:16.075733+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=games-on-japanese.herokuapp.com request_id=8da40229-c0b0-4fc6-975d-4c7485a72fbd fwd="106.72.133.128" dyno= connect= service= status=503 bytes= protocol=https
15
+ 2022-06-19T11:34:16.858513+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=games-on-japanese.herokuapp.com request_id=809ef60f-12b4-4aad-bd90-20b3772d0c0d fwd="106.72.133.128" dyno= connect= service= status=503 bytes= protocol=https
16
+ ```
8
17
  favicon.icoはルートディレクトリに置いてあります。
9
18
 
10
19
  package.jsonは
20
+ ```
11
21
  {
12
22
  "name": "xxxxxx",
13
23
  "version": "0.0.0",
@@ -31,6 +41,12 @@
31
41
  "mysql": "^2.18.1"
32
42
  }
33
43
  }
44
+ ```
45
+
46
+ Procfileをルートディレクトリに作りました。内容は以下の通りです。
47
+ ```
48
+ web: node index
49
+ ```
34
50
 
35
51
  エラーの内容をもっと具体的に知りたいのですが、方法がわかりません。
36
52
  どなたか、Herokuのこのエラーの内容をさらに調べる方法を教えていただけないでしょうか。