質問編集履歴
1
エラー内容、environment.js及びapplication.jsソースコードを添付
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,3 +11,123 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
解決方法についてご教授願います。
|
14
|
+
|
15
|
+
以下、エラー内容となっております。
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
```
|
20
|
+
|
21
|
+
remote: Compilation failed:
|
22
|
+
|
23
|
+
remote: /tmp/build_397464b6/config/webpack/environment.js:5
|
24
|
+
|
25
|
+
remote: new.webpack.ProvidePlugin({
|
26
|
+
|
27
|
+
remote: ^^^^^^^
|
28
|
+
|
29
|
+
remote:
|
30
|
+
|
31
|
+
remote: SyntaxError: Unexpected identifier
|
32
|
+
|
33
|
+
.
|
34
|
+
|
35
|
+
.
|
36
|
+
|
37
|
+
.
|
38
|
+
|
39
|
+
remote: !
|
40
|
+
|
41
|
+
remote: ! Precompiling assets failed.
|
42
|
+
|
43
|
+
remote: !
|
44
|
+
|
45
|
+
remote: ! Push rejected, failed to compile Ruby app.
|
46
|
+
|
47
|
+
remote:
|
48
|
+
|
49
|
+
remote: ! Push failed
|
50
|
+
|
51
|
+
remote: !
|
52
|
+
|
53
|
+
remote: ! ## Warning - The same version of this code has already been built: cfb0dac017b63dbf1ec9ebf4f9c1b164731fbab8
|
54
|
+
|
55
|
+
remote: !
|
56
|
+
|
57
|
+
remote: ! We have detected that you have triggered a build from source code with version cfb0dac017b63dbf1ec9ebf4f9c1b164731fbab8
|
58
|
+
|
59
|
+
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
|
60
|
+
|
61
|
+
remote: !
|
62
|
+
|
63
|
+
remote: ! If you are developing on a branch and deploying via git you must run:
|
64
|
+
|
65
|
+
```
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
以下、エラーを引き起こしている(?)該当ファイルになります。
|
70
|
+
|
71
|
+
environment.js
|
72
|
+
|
73
|
+
```environment.js
|
74
|
+
|
75
|
+
const { environment } = require('@rails/webpacker')
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
const webpack = require('webpack')
|
80
|
+
|
81
|
+
environment.plugins.prepend('Provide',
|
82
|
+
|
83
|
+
new webpack.ProvidePlugin ( {
|
84
|
+
|
85
|
+
$: 'jquery/src/jquery',
|
86
|
+
|
87
|
+
jQuery: 'jquery/src/jquery'
|
88
|
+
|
89
|
+
} )
|
90
|
+
|
91
|
+
)
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
module.exports = environment
|
96
|
+
|
97
|
+
```
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
application.js
|
102
|
+
|
103
|
+
```application.js
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
// This file is automatically compiled by Webpack, along with any other files
|
108
|
+
|
109
|
+
// present in this directory. You're encouraged to place your actual application logic in
|
110
|
+
|
111
|
+
// a relevant structure within app/javascript and only use these pack files to reference
|
112
|
+
|
113
|
+
// that code so it'll be compiled.
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
import Rails from "@rails/ujs"
|
118
|
+
|
119
|
+
import Turbolinks from "turbolinks"
|
120
|
+
|
121
|
+
import * as ActiveStorage from "@rails/activestorage"
|
122
|
+
|
123
|
+
import "channels"
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
Rails.start()
|
128
|
+
|
129
|
+
Turbolinks.start()
|
130
|
+
|
131
|
+
ActiveStorage.start()
|
132
|
+
|
133
|
+
```
|