質問編集履歴
8
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
### 発生している問題・エラーメッセージ
|
8
8
|
|
9
|
-
|
9
|
+
Heroku画面上
|
10
10
|
```
|
11
11
|
Application error
|
12
12
|
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
|
7
title
CHANGED
File without changes
|
body
CHANGED
@@ -12,13 +12,14 @@
|
|
12
12
|
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
|
13
13
|
heroku logs --tail
|
14
14
|
```
|
15
|
+
|
15
|
-
|
16
|
+
heroku logs
|
16
17
|
```
|
17
18
|
2020-08-12T01:35:38.374935+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=XXX request_id=890b5e7b-d82e-44d6-a3a1-f855b93ea81e fwd="106.72.36.193" dyno= connect= service= status=503 bytes= protocol=https
|
18
19
|
2020-08-12T01:35:38.754952+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=XXX request_id=599e073f-0c6b-4b4e-b38d-8a60618563f7 fwd="106.72.36.193" dyno= connect= service= status=503 bytes= protocol=https
|
19
20
|
```
|
20
21
|
|
21
|
-
エラー(ReferenceError: window is not defined)が発生し、解消方法がわからない状態です。
|
22
|
+
デプロイ直後に下記エラー(ReferenceError: window is not defined)が発生し、解消方法がわからない状態です。
|
22
23
|
[サポート](https://support.skyway.io/hc/ja/community/posts/360046667354-node-js%E7%92%B0%E5%A2%83%E3%81%A7%E3%81%AEJS-SDK%E3%81%AE%E4%BD%BF%E7%94%A8)にnode.js環境下では実行できないとありましたが、Heroku環境下で実行する方法はないのでしょうか。
|
23
24
|
webサービス初心者なので質問が安直で恐縮ですが、ご教授願いたいです。
|
24
25
|
|
6
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
SkyWay ConferenceをHerokuにデプロイし、技術検証をしたかったのですが、デプロイ完了後にApplication errorになってしまいます。
|
3
3
|
このエラーを解消したいのですが、ログを見ても原因がわからないため、ご教授願いたいです。
|
4
|
-
**※【追記】のエラーの解消方法が知りたいです。**
|
5
4
|
|
6
5
|
[デプロイファイルはこの手順で作成しました](https://qiita.com/yusuke84/items/e86501810acaa146195d)
|
7
6
|
|
@@ -18,26 +17,31 @@
|
|
18
17
|
2020-08-12T01:35:38.374935+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=XXX request_id=890b5e7b-d82e-44d6-a3a1-f855b93ea81e fwd="106.72.36.193" dyno= connect= service= status=503 bytes= protocol=https
|
19
18
|
2020-08-12T01:35:38.754952+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=XXX request_id=599e073f-0c6b-4b4e-b38d-8a60618563f7 fwd="106.72.36.193" dyno= connect= service= status=503 bytes= protocol=https
|
20
19
|
```
|
21
|
-
※下記エラー(Error: Cannot find module '/app/index.js')解消済みのため、取り消し
|
22
|
-
~~もう一度同じ手順でやり直してデプロイのログを確認したところ、Errorが発生していました。~~
|
23
|
-
~~2020-08-12T02:52:11.405226+00:00 heroku[web.1]: State changed from crashed to starting~~
|
24
|
-
~~2020-08-12T02:52:13.765724+00:00 heroku[web.1]: Starting process with command `node index.js`~~
|
25
|
-
~~2020-08-12T02:52:16.124718+00:00 heroku[web.1]: Process exited with status 1~~
|
26
|
-
~~2020-08-12T02:52:16.171260+00:00 heroku[web.1]: State changed from starting to crashed~~
|
27
|
-
~~2020-08-12T02:52:16.056568+00:00 app[web.1]: internal/modules/cjs/loader.js:968~~
|
28
|
-
~~2020-08-12T02:52:16.056625+00:00 app[web.1]: throw err;~~
|
29
|
-
~~2020-08-12T02:52:16.056626+00:00 app[web.1]: ^~~
|
30
|
-
~~2020-08-12T02:52:16.056626+00:00 app[web.1]: ~~
|
31
|
-
~~2020-08-12T02:52:16.056628+00:00 app[web.1]: Error: Cannot find module '/app/index.js'~~
|
32
|
-
~~2020-08-12T02:52:16.056634+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)~~
|
33
|
-
~~2020-08-12T02:52:16.056634+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:841:27)
|
34
|
-
2020-08-12T02:52:16.056636+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
|
35
|
-
2020-08-12T02:52:16.056637+00:00 app[web.1]: at internal/main/run_main_module.js:17:47 {
|
36
|
-
2020-08-12T02:52:16.056638+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
|
37
|
-
2020-08-12T02:52:16.056639+00:00 app[web.1]: requireStack: []
|
38
|
-
2020-08-12T02:52:16.056639+00:00 app[web.1]: }~~
|
39
20
|
|
21
|
+
エラー(ReferenceError: window is not defined)が発生し、解消方法がわからない状態です。
|
22
|
+
[サポート](https://support.skyway.io/hc/ja/community/posts/360046667354-node-js%E7%92%B0%E5%A2%83%E3%81%A7%E3%81%AEJS-SDK%E3%81%AE%E4%BD%BF%E7%94%A8)にnode.js環境下では実行できないとありましたが、Heroku環境下で実行する方法はないのでしょうか。
|
23
|
+
webサービス初心者なので質問が安直で恐縮ですが、ご教授願いたいです。
|
40
24
|
|
25
|
+
```
|
26
|
+
2020-08-12T15:17:21.893432+00:00 heroku[web.1]: Starting process with command `node index.bundle.js`
|
27
|
+
2020-08-12T15:17:24.535440+00:00 heroku[web.1]: Process exited with status 1
|
28
|
+
2020-08-12T15:17:24.587888+00:00 heroku[web.1]: State changed from starting to crashed
|
29
|
+
2020-08-12T15:17:24.590391+00:00 heroku[web.1]: State changed from crashed to starting
|
30
|
+
2020-08-12T15:17:24.474946+00:00 app[web.1]: /app/index.bundle.js:1
|
31
|
+
2020-08-12T15:17:24.474995+00:00 app[web.1]: !function(e){function t(t){for(var n,o,c=t[0],s=t[1],l=t[2],f=0,d=[];f<c.length;f++)o=c[f],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&d.push(a[o][0]),a[o]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(u&&u(t);d.length;)d.shift()();return i.push.apply(i,l||[]),r()}function r(){for(var e,t=0;t<i.length;t++){for(var r=i[t],n=!0,c=1;c<r.length;c++){var s=r[c];0!==a[s]&&(n=!1)}n&&(i.splice(t--,1),e=o(o.s=r[0]))}return e}var n={},a={2:0},i=[];function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var c=window.webpackJsonp=window.webpackJsonp||[],s=c.push.bind(c);c.push=t,c=c.slice();for(var l=0;l<c.length;l++)t(c[l]);var u=s;i.push([34,0]),r()}([,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return c}));var n=r(0);const a=16,i={blue:"#005ece",lightblue:"#039be5",red:"#ff6673",gray:"#eee",white:"#fff",black:"#111"},o={moveBackground:n.d`
|
32
|
+
2020-08-12T15:17:24.475000+00:00 app[web.1]:
|
33
|
+
2020-08-12T15:17:24.475001+00:00 app[web.1]:
|
34
|
+
2020-08-12T15:17:24.475001+00:00 app[web.1]: ReferenceError: window is not defined
|
35
|
+
2020-08-12T15:17:24.475001+00:00 app[web.1]: at /app/index.bundle.js:1:1359
|
36
|
+
2020-08-12T15:17:24.475002+00:00 app[web.1]: at Object.<anonymous> (/app/index.bundle.js:1:1503)
|
37
|
+
2020-08-12T15:17:24.475002+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1137:30)
|
38
|
+
2020-08-12T15:17:24.475007+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
|
39
|
+
2020-08-12T15:17:24.475007+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:985:32)
|
40
|
+
2020-08-12T15:17:24.475007+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:878:14)
|
41
|
+
2020-08-12T15:17:24.475012+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
|
42
|
+
2020-08-12T15:17:24.475012+00:00 app[web.1]: at internal/main/run_main_module.js:17:47
|
43
|
+
```
|
44
|
+
|
41
45
|
### 作成ファイル
|
42
46
|
[手順通り](https://qiita.com/yusuke84/items/e86501810acaa146195d)に下記ファイルを作成し、デプロイしました。
|
43
47
|
また、Herokuを使用するにあたり、**package.json**と**Procfile**が必要と調べてわかったので新たに作成しています。
|
@@ -67,32 +71,4 @@
|
|
67
71
|
|
68
72
|
### 試したこと
|
69
73
|
|
70
|
-
Pushエラー回避のため、package.jsonとProcfileは新たに作成しました。
|
71
|
-
|
72
|
-
※下記エラー(Error: Cannot find module '/app/index.js')解消済みのため、取り消し
|
73
|
-
~~新たにappフォルダを作成し、全ファイルをその配下に配置しても同じエラー(Error: Cannot find module '/app/index.js')が発生していました。~~
|
74
|
-
|
75
|
-
### 【追記】上記エラー(Error: Cannot find module '/app/index.js')は解消したが、新たなエラー(ReferenceError: window is not defined)が発生
|
76
|
-
Procfileの記載内容を**index.js**から**index.budle.js**に変更したら上記エラー(Error: Cannot find module '/app/index.js')は解消しました。そして新たに、ReferenceError: window is not definedが発生し、解消方法がわからない状態です。
|
77
|
-
[サポート](https://support.skyway.io/hc/ja/community/posts/360046667354-node-js%E7%92%B0%E5%A2%83%E3%81%A7%E3%81%AEJS-SDK%E3%81%AE%E4%BD%BF%E7%94%A8)にnode.js環境下では実行できないとありましたが、Heroku環境下で実行する方法はないのでしょうか。
|
78
|
-
webサービス初心者なので質問が安直で恐縮ですが、ご教授願いたいです。
|
79
|
-
|
80
|
-
```
|
81
|
-
2020-08-12T15:17:21.893432+00:00 heroku[web.1]: Starting process with command `node index.bundle.js`
|
82
|
-
2020-08-12T15:17:24.535440+00:00 heroku[web.1]: Process exited with status 1
|
83
|
-
2020-08-12T15:17:24.587888+00:00 heroku[web.1]: State changed from starting to crashed
|
84
|
-
2020-08-12T15:17:24.590391+00:00 heroku[web.1]: State changed from crashed to starting
|
85
|
-
2020-08-12T15:17:24.474946+00:00 app[web.1]: /app/index.bundle.js:1
|
86
|
-
2020-08-12T15:17:24.474995+00:00 app[web.1]: !function(e){function t(t){for(var n,o,c=t[0],s=t[1],l=t[2],f=0,d=[];f<c.length;f++)o=c[f],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&d.push(a[o][0]),a[o]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(u&&u(t);d.length;)d.shift()();return i.push.apply(i,l||[]),r()}function r(){for(var e,t=0;t<i.length;t++){for(var r=i[t],n=!0,c=1;c<r.length;c++){var s=r[c];0!==a[s]&&(n=!1)}n&&(i.splice(t--,1),e=o(o.s=r[0]))}return e}var n={},a={2:0},i=[];function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var c=window.webpackJsonp=window.webpackJsonp||[],s=c.push.bind(c);c.push=t,c=c.slice();for(var l=0;l<c.length;l++)t(c[l]);var u=s;i.push([34,0]),r()}([,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return c}));var n=r(0);const a=16,i={blue:"#005ece",lightblue:"#039be5",red:"#ff6673",gray:"#eee",white:"#fff",black:"#111"},o={moveBackground:n.d`
|
87
|
-
2020-08-12T15:17:24.475000+00:00 app[web.1]:
|
88
|
-
2020-08-12T15:17:24.475001+00:00 app[web.1]:
|
89
|
-
2020-08-12T15:17:24.475001+00:00 app[web.1]: ReferenceError: window is not defined
|
90
|
-
2020-08-12T15:17:24.475001+00:00 app[web.1]: at /app/index.bundle.js:1:1359
|
91
|
-
2020-08-12T15:17:24.475002+00:00 app[web.1]: at Object.<anonymous> (/app/index.bundle.js:1:1503)
|
92
|
-
2020-08-12T15:17:24.475002+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1137:30)
|
93
|
-
2020-08-12T15:17:24.475007+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
|
94
|
-
2020-08-12T15:17:24.475007+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:985:32)
|
95
|
-
2020-08-12T15:17:24.475007+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:878:14)
|
96
|
-
2020-08-12T15:17:24.475012+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
|
97
|
-
2020-08-12T15:17:24.475012+00:00 app[web.1]: at internal/main/run_main_module.js:17:47
|
98
|
-
```
|
74
|
+
Pushエラー回避のため、package.jsonとProcfileは新たに作成しました。
|
5
説明の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
SkyWay ConferenceをHerokuにデプロイし、技術検証をしたかったのですが、デプロイ完了後にApplication errorになってしまいます。
|
3
3
|
このエラーを解消したいのですが、ログを見ても原因がわからないため、ご教授願いたいです。
|
4
|
-
**【追記】のエラーの解消方法が知りたいです。**
|
4
|
+
**※【追記】のエラーの解消方法が知りたいです。**
|
5
5
|
|
6
6
|
[デプロイファイルはこの手順で作成しました](https://qiita.com/yusuke84/items/e86501810acaa146195d)
|
7
7
|
|
@@ -18,6 +18,7 @@
|
|
18
18
|
2020-08-12T01:35:38.374935+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=XXX request_id=890b5e7b-d82e-44d6-a3a1-f855b93ea81e fwd="106.72.36.193" dyno= connect= service= status=503 bytes= protocol=https
|
19
19
|
2020-08-12T01:35:38.754952+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=XXX request_id=599e073f-0c6b-4b4e-b38d-8a60618563f7 fwd="106.72.36.193" dyno= connect= service= status=503 bytes= protocol=https
|
20
20
|
```
|
21
|
+
※下記エラー(Error: Cannot find module '/app/index.js')解消済みのため、取り消し
|
21
22
|
~~もう一度同じ手順でやり直してデプロイのログを確認したところ、Errorが発生していました。~~
|
22
23
|
~~2020-08-12T02:52:11.405226+00:00 heroku[web.1]: State changed from crashed to starting~~
|
23
24
|
~~2020-08-12T02:52:13.765724+00:00 heroku[web.1]: Starting process with command `node index.js`~~
|
@@ -67,9 +68,11 @@
|
|
67
68
|
### 試したこと
|
68
69
|
|
69
70
|
Pushエラー回避のため、package.jsonとProcfileは新たに作成しました。
|
71
|
+
|
72
|
+
※下記エラー(Error: Cannot find module '/app/index.js')解消済みのため、取り消し
|
70
73
|
~~新たにappフォルダを作成し、全ファイルをその配下に配置しても同じエラー(Error: Cannot find module '/app/index.js')が発生していました。~~
|
71
74
|
|
72
|
-
### 【追記】上記エラーは解消したが、新たなエラーが発生
|
75
|
+
### 【追記】上記エラー(Error: Cannot find module '/app/index.js')は解消したが、新たなエラー(ReferenceError: window is not defined)が発生
|
73
76
|
Procfileの記載内容を**index.js**から**index.budle.js**に変更したら上記エラー(Error: Cannot find module '/app/index.js')は解消しました。そして新たに、ReferenceError: window is not definedが発生し、解消方法がわからない状態です。
|
74
77
|
[サポート](https://support.skyway.io/hc/ja/community/posts/360046667354-node-js%E7%92%B0%E5%A2%83%E3%81%A7%E3%81%AEJS-SDK%E3%81%AE%E4%BD%BF%E7%94%A8)にnode.js環境下では実行できないとありましたが、Heroku環境下で実行する方法はないのでしょうか。
|
75
78
|
webサービス初心者なので質問が安直で恐縮ですが、ご教授願いたいです。
|
4
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
SkyWay ConferenceをHerokuにデプロイし、技術検証をしたかったのですが、デプロイ完了後にApplication errorになってしまいます。
|
3
3
|
このエラーを解消したいのですが、ログを見ても原因がわからないため、ご教授願いたいです。
|
4
|
+
**【追記】のエラーの解消方法が知りたいです。**
|
4
5
|
|
5
6
|
[デプロイファイルはこの手順で作成しました](https://qiita.com/yusuke84/items/e86501810acaa146195d)
|
6
7
|
|
@@ -17,26 +18,25 @@
|
|
17
18
|
2020-08-12T01:35:38.374935+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=XXX request_id=890b5e7b-d82e-44d6-a3a1-f855b93ea81e fwd="106.72.36.193" dyno= connect= service= status=503 bytes= protocol=https
|
18
19
|
2020-08-12T01:35:38.754952+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=XXX request_id=599e073f-0c6b-4b4e-b38d-8a60618563f7 fwd="106.72.36.193" dyno= connect= service= status=503 bytes= protocol=https
|
19
20
|
```
|
20
|
-
もう一度同じ手順でやり直してデプロイのログを確認したところ、Errorが発生していました。
|
21
|
+
~~もう一度同じ手順でやり直してデプロイのログを確認したところ、Errorが発生していました。~~
|
21
|
-
```
|
22
|
-
2020-08-12T02:52:11.405226+00:00 heroku[web.1]: State changed from crashed to starting
|
22
|
+
~~2020-08-12T02:52:11.405226+00:00 heroku[web.1]: State changed from crashed to starting~~
|
23
|
-
2020-08-12T02:52:13.765724+00:00 heroku[web.1]: Starting process with command `node index.js`
|
23
|
+
~~2020-08-12T02:52:13.765724+00:00 heroku[web.1]: Starting process with command `node index.js`~~
|
24
|
-
2020-08-12T02:52:16.124718+00:00 heroku[web.1]: Process exited with status 1
|
24
|
+
~~2020-08-12T02:52:16.124718+00:00 heroku[web.1]: Process exited with status 1~~
|
25
|
-
2020-08-12T02:52:16.171260+00:00 heroku[web.1]: State changed from starting to crashed
|
25
|
+
~~2020-08-12T02:52:16.171260+00:00 heroku[web.1]: State changed from starting to crashed~~
|
26
|
-
2020-08-12T02:52:16.056568+00:00 app[web.1]: internal/modules/cjs/loader.js:968
|
26
|
+
~~2020-08-12T02:52:16.056568+00:00 app[web.1]: internal/modules/cjs/loader.js:968~~
|
27
|
-
2020-08-12T02:52:16.056625+00:00 app[web.1]: throw err;
|
27
|
+
~~2020-08-12T02:52:16.056625+00:00 app[web.1]: throw err;~~
|
28
|
-
2020-08-12T02:52:16.056626+00:00 app[web.1]: ^
|
28
|
+
~~2020-08-12T02:52:16.056626+00:00 app[web.1]: ^~~
|
29
|
-
2020-08-12T02:52:16.056626+00:00 app[web.1]:
|
29
|
+
~~2020-08-12T02:52:16.056626+00:00 app[web.1]: ~~
|
30
|
-
2020-08-12T02:52:16.056628+00:00 app[web.1]: Error: Cannot find module '/app/index.js'
|
30
|
+
~~2020-08-12T02:52:16.056628+00:00 app[web.1]: Error: Cannot find module '/app/index.js'~~
|
31
|
-
2020-08-12T02:52:16.056634+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
|
31
|
+
~~2020-08-12T02:52:16.056634+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)~~
|
32
|
-
2020-08-12T02:52:16.056634+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:841:27)
|
32
|
+
~~2020-08-12T02:52:16.056634+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:841:27)
|
33
33
|
2020-08-12T02:52:16.056636+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
|
34
34
|
2020-08-12T02:52:16.056637+00:00 app[web.1]: at internal/main/run_main_module.js:17:47 {
|
35
35
|
2020-08-12T02:52:16.056638+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
|
36
36
|
2020-08-12T02:52:16.056639+00:00 app[web.1]: requireStack: []
|
37
|
-
2020-08-12T02:52:16.056639+00:00 app[web.1]: }
|
37
|
+
2020-08-12T02:52:16.056639+00:00 app[web.1]: }~~
|
38
|
-
```
|
39
38
|
|
39
|
+
|
40
40
|
### 作成ファイル
|
41
41
|
[手順通り](https://qiita.com/yusuke84/items/e86501810acaa146195d)に下記ファイルを作成し、デプロイしました。
|
42
42
|
また、Herokuを使用するにあたり、**package.json**と**Procfile**が必要と調べてわかったので新たに作成しています。
|
@@ -60,11 +60,36 @@
|
|
60
60
|
```
|
61
61
|
Procfileには下記を記載
|
62
62
|
```
|
63
|
-
web: node index.js
|
63
|
+
web: node index.bundle.js
|
64
64
|
```
|
65
65
|
|
66
66
|
|
67
67
|
### 試したこと
|
68
68
|
|
69
69
|
Pushエラー回避のため、package.jsonとProcfileは新たに作成しました。
|
70
|
-
新たにappフォルダを作成し、全ファイルをその配下に配置しても同じエラー(Error: Cannot find module '/app/index.js')が発生していました。
|
70
|
+
~~新たにappフォルダを作成し、全ファイルをその配下に配置しても同じエラー(Error: Cannot find module '/app/index.js')が発生していました。~~
|
71
|
+
|
72
|
+
### 【追記】上記エラーは解消したが、新たなエラーが発生
|
73
|
+
Procfileの記載内容を**index.js**から**index.budle.js**に変更したら上記エラー(Error: Cannot find module '/app/index.js')は解消しました。そして新たに、ReferenceError: window is not definedが発生し、解消方法がわからない状態です。
|
74
|
+
[サポート](https://support.skyway.io/hc/ja/community/posts/360046667354-node-js%E7%92%B0%E5%A2%83%E3%81%A7%E3%81%AEJS-SDK%E3%81%AE%E4%BD%BF%E7%94%A8)にnode.js環境下では実行できないとありましたが、Heroku環境下で実行する方法はないのでしょうか。
|
75
|
+
webサービス初心者なので質問が安直で恐縮ですが、ご教授願いたいです。
|
76
|
+
|
77
|
+
```
|
78
|
+
2020-08-12T15:17:21.893432+00:00 heroku[web.1]: Starting process with command `node index.bundle.js`
|
79
|
+
2020-08-12T15:17:24.535440+00:00 heroku[web.1]: Process exited with status 1
|
80
|
+
2020-08-12T15:17:24.587888+00:00 heroku[web.1]: State changed from starting to crashed
|
81
|
+
2020-08-12T15:17:24.590391+00:00 heroku[web.1]: State changed from crashed to starting
|
82
|
+
2020-08-12T15:17:24.474946+00:00 app[web.1]: /app/index.bundle.js:1
|
83
|
+
2020-08-12T15:17:24.474995+00:00 app[web.1]: !function(e){function t(t){for(var n,o,c=t[0],s=t[1],l=t[2],f=0,d=[];f<c.length;f++)o=c[f],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&d.push(a[o][0]),a[o]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(u&&u(t);d.length;)d.shift()();return i.push.apply(i,l||[]),r()}function r(){for(var e,t=0;t<i.length;t++){for(var r=i[t],n=!0,c=1;c<r.length;c++){var s=r[c];0!==a[s]&&(n=!1)}n&&(i.splice(t--,1),e=o(o.s=r[0]))}return e}var n={},a={2:0},i=[];function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var c=window.webpackJsonp=window.webpackJsonp||[],s=c.push.bind(c);c.push=t,c=c.slice();for(var l=0;l<c.length;l++)t(c[l]);var u=s;i.push([34,0]),r()}([,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"d",(function(){return c}));var n=r(0);const a=16,i={blue:"#005ece",lightblue:"#039be5",red:"#ff6673",gray:"#eee",white:"#fff",black:"#111"},o={moveBackground:n.d`
|
84
|
+
2020-08-12T15:17:24.475000+00:00 app[web.1]:
|
85
|
+
2020-08-12T15:17:24.475001+00:00 app[web.1]:
|
86
|
+
2020-08-12T15:17:24.475001+00:00 app[web.1]: ReferenceError: window is not defined
|
87
|
+
2020-08-12T15:17:24.475001+00:00 app[web.1]: at /app/index.bundle.js:1:1359
|
88
|
+
2020-08-12T15:17:24.475002+00:00 app[web.1]: at Object.<anonymous> (/app/index.bundle.js:1:1503)
|
89
|
+
2020-08-12T15:17:24.475002+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1137:30)
|
90
|
+
2020-08-12T15:17:24.475007+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
|
91
|
+
2020-08-12T15:17:24.475007+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:985:32)
|
92
|
+
2020-08-12T15:17:24.475007+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:878:14)
|
93
|
+
2020-08-12T15:17:24.475012+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
|
94
|
+
2020-08-12T15:17:24.475012+00:00 app[web.1]: at internal/main/run_main_module.js:17:47
|
95
|
+
```
|
3
書式の改善
title
CHANGED
File without changes
|
body
CHANGED
@@ -17,8 +17,7 @@
|
|
17
17
|
2020-08-12T01:35:38.374935+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=XXX request_id=890b5e7b-d82e-44d6-a3a1-f855b93ea81e fwd="106.72.36.193" dyno= connect= service= status=503 bytes= protocol=https
|
18
18
|
2020-08-12T01:35:38.754952+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=XXX request_id=599e073f-0c6b-4b4e-b38d-8a60618563f7 fwd="106.72.36.193" dyno= connect= service= status=503 bytes= protocol=https
|
19
19
|
```
|
20
|
-
### 再デプロイ時のエラーログ
|
21
|
-
|
20
|
+
もう一度同じ手順でやり直してデプロイのログを確認したところ、Errorが発生していました。
|
22
21
|
```
|
23
22
|
2020-08-12T02:52:11.405226+00:00 heroku[web.1]: State changed from crashed to starting
|
24
23
|
2020-08-12T02:52:13.765724+00:00 heroku[web.1]: Starting process with command `node index.js`
|
2
試したことの追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -68,4 +68,4 @@
|
|
68
68
|
### 試したこと
|
69
69
|
|
70
70
|
Pushエラー回避のため、package.jsonとProcfileは新たに作成しました。
|
71
|
-
|
71
|
+
新たにappフォルダを作成し、全ファイルをその配下に配置しても同じエラー(Error: Cannot find module '/app/index.js')が発生していました。
|
1
再デプロイ時のエラーログの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -17,8 +17,27 @@
|
|
17
17
|
2020-08-12T01:35:38.374935+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=XXX request_id=890b5e7b-d82e-44d6-a3a1-f855b93ea81e fwd="106.72.36.193" dyno= connect= service= status=503 bytes= protocol=https
|
18
18
|
2020-08-12T01:35:38.754952+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=XXX request_id=599e073f-0c6b-4b4e-b38d-8a60618563f7 fwd="106.72.36.193" dyno= connect= service= status=503 bytes= protocol=https
|
19
19
|
```
|
20
|
+
### 再デプロイ時のエラーログ
|
21
|
+
再デプロイ時にErrorが発生していました。
|
22
|
+
```
|
23
|
+
2020-08-12T02:52:11.405226+00:00 heroku[web.1]: State changed from crashed to starting
|
24
|
+
2020-08-12T02:52:13.765724+00:00 heroku[web.1]: Starting process with command `node index.js`
|
25
|
+
2020-08-12T02:52:16.124718+00:00 heroku[web.1]: Process exited with status 1
|
26
|
+
2020-08-12T02:52:16.171260+00:00 heroku[web.1]: State changed from starting to crashed
|
27
|
+
2020-08-12T02:52:16.056568+00:00 app[web.1]: internal/modules/cjs/loader.js:968
|
28
|
+
2020-08-12T02:52:16.056625+00:00 app[web.1]: throw err;
|
29
|
+
2020-08-12T02:52:16.056626+00:00 app[web.1]: ^
|
30
|
+
2020-08-12T02:52:16.056626+00:00 app[web.1]:
|
31
|
+
2020-08-12T02:52:16.056628+00:00 app[web.1]: Error: Cannot find module '/app/index.js'
|
32
|
+
2020-08-12T02:52:16.056634+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
|
33
|
+
2020-08-12T02:52:16.056634+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:841:27)
|
34
|
+
2020-08-12T02:52:16.056636+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
|
35
|
+
2020-08-12T02:52:16.056637+00:00 app[web.1]: at internal/main/run_main_module.js:17:47 {
|
36
|
+
2020-08-12T02:52:16.056638+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
|
37
|
+
2020-08-12T02:52:16.056639+00:00 app[web.1]: requireStack: []
|
38
|
+
2020-08-12T02:52:16.056639+00:00 app[web.1]: }
|
39
|
+
```
|
20
40
|
|
21
|
-
|
22
41
|
### 作成ファイル
|
23
42
|
[手順通り](https://qiita.com/yusuke84/items/e86501810acaa146195d)に下記ファイルを作成し、デプロイしました。
|
24
43
|
また、Herokuを使用するにあたり、**package.json**と**Procfile**が必要と調べてわかったので新たに作成しています。
|