質問編集履歴

3

タグの追記

2020/01/20 06:25

投稿

toshihirokato
toshihirokato

スコア20

test CHANGED
File without changes
test CHANGED
File without changes

2

タイトルの変更

2020/01/20 06:25

投稿

toshihirokato
toshihirokato

スコア20

test CHANGED
@@ -1 +1 @@
1
- hardsourceエラーを解決したい。
1
+ Nuxt.jsのhardsourceエラーを解決したい。
test CHANGED
@@ -276,11 +276,11 @@
276
276
 
277
277
 
278
278
 
279
+ [こちらのgithub.com](https://github.com/mzgoddard/hard-source-webpack-plugin/issues/416)を参考に、node_modules/.cacheを削除してyarn run devを実行しましたが、解決しませんでした。
280
+
281
+
282
+
279
- [こちらの記事](https://blog.csdn.net/u013703185/article/details/85855981)を参考に、node_modules/.cache削除てyarn run devを実行しましたが、解決ませんでした。
283
+ また、[こちらの記事](https://blog.csdn.net/u013703185/article/details/85855981)を参考に、webpackアップデートようとしましたが、これ以上アップデートできず解決に至りませんでした。
280
-
281
-
282
-
283
- また、[こちらの記事](https://github.com/mzgoddard/hard-source-webpack-plugin/issues/416)を参考に、webpackをアップデートしようとしましたが、これ以上アップデートできず解決に至りませんでした。
284
284
 
285
285
 
286
286
 
@@ -395,3 +395,7 @@
395
395
  WARN [hardsource:204cee08] Node dependencies changed. Building new cache.
396
396
 
397
397
  ```
398
+
399
+
400
+
401
+ 調べたところ、上記の3つのwarnは問題ない挙動だそうです。

1

追記

2020/01/20 06:25

投稿

toshihirokato
toshihirokato

スコア20

test CHANGED
File without changes
test CHANGED
@@ -12,255 +12,359 @@
12
12
 
13
13
 
14
14
 
15
+ ```terminal
16
+
17
+ ERROR [hardsource:204cee08] Could not freeze ./.nuxt/router.js: Cannot read property 'hash' of undefined
18
+
15
19
  ```
16
20
 
21
+
22
+
23
+ ### 該当のソースコード
24
+
25
+
26
+
27
+ ```nuxt
28
+
29
+ import colors from 'vuetify/es5/util/colors'
30
+
31
+ // import webpack from 'webpack'
32
+
33
+ // import NuxtConfiguration from '@nuxt/config'
34
+
35
+
36
+
37
+ // const config: NuxtConfiguration = {
38
+
39
+ // build: {
40
+
41
+ // extend(config, ctx) {
42
+
43
+ // config.externals = {
44
+
45
+ // moment: 'moment'
46
+
47
+ // }
48
+
49
+ // }
50
+
51
+ // }
52
+
53
+ // }
54
+
55
+
56
+
57
+ // export default config
58
+
59
+
60
+
61
+ export default {
62
+
63
+ mode: 'spa',
64
+
65
+ srcDir: 'app',
66
+
67
+ /*
68
+
69
+ ** Headers of the page
70
+
71
+ */
72
+
73
+ head: {
74
+
75
+ script: [
76
+
77
+ ],
78
+
79
+ titleTemplate: '%s - ' + process.env.npm_package_name,
80
+
81
+ title: process.env.npm_package_name || '',
82
+
83
+ meta: [
84
+
85
+ { charset: 'utf-8' },
86
+
87
+ { name: 'viewport', content: 'width=device-width, initial-scale=1' },
88
+
17
- ERROR [hardsource:204cee08] Could not freeze ./.nuxt/router.js: Cannot read property 'hash' of undefined
89
+ { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
90
+
91
+ ],
92
+
93
+ link: [
94
+
95
+ { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
96
+
97
+ ]
98
+
99
+ },
100
+
101
+ /*
102
+
103
+ ** Customize the progress-bar color
104
+
105
+ */
106
+
107
+ loading: { color: '#fff' },
108
+
109
+ /*
110
+
111
+ ** Global CSS
112
+
113
+ */
114
+
115
+ css: [
116
+
117
+ ],
118
+
119
+ /*
120
+
121
+ ** Plugins to load before mounting the App
122
+
123
+ */
124
+
125
+ plugins: [
126
+
127
+ '~/plugins/firebase'
128
+
129
+ ],
130
+
131
+ /*
132
+
133
+ ** Nuxt.js dev-modules
134
+
135
+ */
136
+
137
+ buildModules: [
138
+
139
+ // Doc: https://github.com/nuxt-community/eslint-module
140
+
141
+ '@nuxtjs/eslint-module',
142
+
143
+ '@nuxtjs/vuetify'
144
+
145
+ ],
146
+
147
+ /*
148
+
149
+ ** Nuxt.js modules
150
+
151
+ */
152
+
153
+ modules: [
154
+
155
+ // Doc: https://axios.nuxtjs.org/usage
156
+
157
+ '@nuxtjs/axios'
158
+
159
+ ],
160
+
161
+ /*
162
+
163
+ ** Axios module configuration
164
+
165
+ ** See https://axios.nuxtjs.org/options
166
+
167
+ */
168
+
169
+ axios: {
170
+
171
+ },
172
+
173
+ /*
174
+
175
+ ** vuetify module configuration
176
+
177
+ ** https://github.com/nuxt-community/vuetify-module
178
+
179
+ */
180
+
181
+ vuetify: {
182
+
183
+ customVariables: ['~/assets/variables.scss'],
184
+
185
+ theme: {
186
+
187
+ dark: false,
188
+
189
+ themes: {
190
+
191
+ light: {
192
+
193
+ primary: colors.purple,
194
+
195
+ secondary: colors.grey.darken1,
196
+
197
+ accent: colors.shades.black,
198
+
199
+ error: colors.red.accent3
200
+
201
+ },
202
+
203
+ dark: {
204
+
205
+ primary: colors.blue.darken2,
206
+
207
+ accent: colors.grey.darken3,
208
+
209
+ secondary: colors.amber.darken3,
210
+
211
+ info: colors.teal.lighten1,
212
+
213
+ warning: colors.amber.base,
214
+
215
+ error: colors.deepOrange.accent4,
216
+
217
+ success: colors.green.accent3
218
+
219
+ }
220
+
221
+ }
222
+
223
+ }
224
+
225
+ },
226
+
227
+ /*
228
+
229
+ ** Build configuration
230
+
231
+ */
232
+
233
+ build: {
234
+
235
+ publishPath: [
236
+
237
+ ],
238
+
239
+ vendeer: ['moment'],
240
+
241
+ analyze: false,
242
+
243
+ /*
244
+
245
+ ** You can extend webpack config here
246
+
247
+ */
248
+
249
+ extend (config, ctx) {
250
+
251
+ const HardSourceWebpackPlugin = require('hard-source-webpack-plugin')
252
+
253
+ config.plugins.push(new HardSourceWebpackPlugin())
254
+
255
+
256
+
257
+ config.externals = {
258
+
259
+ moment: 'moment'
260
+
261
+ }
262
+
263
+ }
264
+
265
+ }
266
+
267
+ }
268
+
269
+
18
270
 
19
271
  ```
20
272
 
21
273
 
22
274
 
23
- ### 該当のソースコード
24
-
25
-
26
-
27
- ```nuxt
28
-
29
- import colors from 'vuetify/es5/util/colors'
30
-
31
- // import webpack from 'webpack'
32
-
33
- // import NuxtConfiguration from '@nuxt/config'
34
-
35
-
36
-
37
- // const config: NuxtConfiguration = {
38
-
39
- // build: {
40
-
41
- // extend(config, ctx) {
42
-
43
- // config.externals = {
44
-
45
- // moment: 'moment'
46
-
47
- // }
48
-
49
- // }
50
-
51
- // }
52
-
53
- // }
54
-
55
-
56
-
57
- // export default config
58
-
59
-
60
-
61
- export default {
62
-
63
- mode: 'spa',
64
-
65
- srcDir: 'app',
66
-
67
- /*
68
-
69
- ** Headers of the page
70
-
71
- */
72
-
73
- head: {
74
-
75
- script: [
76
-
77
- ],
78
-
79
- titleTemplate: '%s - ' + process.env.npm_package_name,
80
-
81
- title: process.env.npm_package_name || '',
82
-
83
- meta: [
84
-
85
- { charset: 'utf-8' },
86
-
87
- { name: 'viewport', content: 'width=device-width, initial-scale=1' },
88
-
89
- { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
90
-
91
- ],
92
-
93
- link: [
94
-
95
- { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
96
-
97
- ]
98
-
99
- },
100
-
101
- /*
102
-
103
- ** Customize the progress-bar color
104
-
105
- */
106
-
107
- loading: { color: '#fff' },
108
-
109
- /*
110
-
111
- ** Global CSS
112
-
113
- */
114
-
115
- css: [
116
-
117
- ],
118
-
119
- /*
120
-
121
- ** Plugins to load before mounting the App
122
-
123
- */
124
-
125
- plugins: [
126
-
127
- '~/plugins/firebase'
128
-
129
- ],
130
-
131
- /*
132
-
133
- ** Nuxt.js dev-modules
134
-
135
- */
136
-
137
- buildModules: [
138
-
139
- // Doc: https://github.com/nuxt-community/eslint-module
140
-
141
- '@nuxtjs/eslint-module',
142
-
143
- '@nuxtjs/vuetify'
144
-
145
- ],
146
-
147
- /*
148
-
149
- ** Nuxt.js modules
150
-
151
- */
152
-
153
- modules: [
154
-
155
- // Doc: https://axios.nuxtjs.org/usage
156
-
157
- '@nuxtjs/axios'
158
-
159
- ],
160
-
161
- /*
162
-
163
- ** Axios module configuration
164
-
165
- ** See https://axios.nuxtjs.org/options
166
-
167
- */
168
-
169
- axios: {
170
-
171
- },
172
-
173
- /*
174
-
175
- ** vuetify module configuration
176
-
177
- ** https://github.com/nuxt-community/vuetify-module
178
-
179
- */
180
-
181
- vuetify: {
182
-
183
- customVariables: ['~/assets/variables.scss'],
184
-
185
- theme: {
186
-
187
- dark: false,
188
-
189
- themes: {
190
-
191
- light: {
192
-
193
- primary: colors.purple,
194
-
195
- secondary: colors.grey.darken1,
196
-
197
- accent: colors.shades.black,
198
-
199
- error: colors.red.accent3
200
-
201
- },
202
-
203
- dark: {
204
-
205
- primary: colors.blue.darken2,
206
-
207
- accent: colors.grey.darken3,
208
-
209
- secondary: colors.amber.darken3,
210
-
211
- info: colors.teal.lighten1,
212
-
213
- warning: colors.amber.base,
214
-
215
- error: colors.deepOrange.accent4,
216
-
217
- success: colors.green.accent3
218
-
219
- }
220
-
221
- }
222
-
223
- }
224
-
225
- },
226
-
227
- /*
228
-
229
- ** Build configuration
230
-
231
- */
232
-
233
- build: {
234
-
235
- publishPath: [
236
-
237
- ],
238
-
239
- vendeer: ['moment'],
240
-
241
- analyze: false,
242
-
243
- /*
244
-
245
- ** You can extend webpack config here
246
-
247
- */
248
-
249
- extend (config, ctx) {
250
-
251
- const HardSourceWebpackPlugin = require('hard-source-webpack-plugin')
252
-
253
- config.plugins.push(new HardSourceWebpackPlugin())
254
-
255
-
256
-
257
- config.externals = {
258
-
259
- moment: 'moment'
260
-
261
- }
262
-
263
- }
275
+ ### 試したこと
276
+
277
+
278
+
279
+ [こちらの記事](https://blog.csdn.net/u013703185/article/details/85855981)を参考に、node_modules/.cacheを削除してyarn run devを実行しましたが、解決しませんでした。
280
+
281
+
282
+
283
+ また、[こちらの記事](https://github.com/mzgoddard/hard-source-webpack-plugin/issues/416)を参考に、webpackをアップデートしようとしましたが、これ以上アップデートできず解決に至りませんでした。
284
+
285
+
286
+
287
+ ### 補足情報(FW/ツールのバージョンなど)
288
+
289
+
290
+
291
+ ```package
292
+
293
+ {
294
+
295
+ "name": "",
296
+
297
+ "version": "1.0.0",
298
+
299
+ "description": "My epic Nuxt.js project",
300
+
301
+ "author": "",
302
+
303
+ "private": true,
304
+
305
+ "scripts": {
306
+
307
+ "dev": "nuxt",
308
+
309
+ "build": "nuxt build",
310
+
311
+ "start": "nuxt start",
312
+
313
+ "generate": "nuxt generate",
314
+
315
+ "lint": "eslint --ext .js,.vue --ignore-path .gitignore ."
316
+
317
+ },
318
+
319
+ "dependencies": {
320
+
321
+ "@nuxtjs/axios": "^5.8.0",
322
+
323
+ "analyze": "^0.0.14",
324
+
325
+ "chart.js": "^2.9.3",
326
+
327
+ "config": "^3.2.4",
328
+
329
+ "eslint-plugin-import": "^2.19.1",
330
+
331
+ "eslint-plugin-vue": "^6.1.2",
332
+
333
+ "eslint-scope": "^5.0.0",
334
+
335
+ "firebase": "^7.6.0",
336
+
337
+ "hard-source-webpack-plugin": "^0.13.1",
338
+
339
+ "latest": "^0.2.0",
340
+
341
+ "nuxt": "^2.10.2",
342
+
343
+ "stylus": "^0.54.7",
344
+
345
+ "stylus-loader": "^3.0.2",
346
+
347
+ "vue-chartjs": "^3.5.0",
348
+
349
+ "webpack": "^4.41.5",
350
+
351
+ "yarn": "^1.21.1"
352
+
353
+ },
354
+
355
+ "devDependencies": {
356
+
357
+ "@nuxtjs/eslint-config": "^2.0.0",
358
+
359
+ "@nuxtjs/eslint-module": "^1.1.0",
360
+
361
+ "@nuxtjs/vuetify": "^1.9.1",
362
+
363
+ "babel-eslint": "^10.0.3",
364
+
365
+ "eslint": "^6.7.2",
366
+
367
+ "eslint-plugin-nuxt": ">=0.5.0"
264
368
 
265
369
  }
266
370
 
@@ -270,106 +374,24 @@
270
374
 
271
375
  ```
272
376
 
273
-
274
-
275
- ### 試したこと
377
+ ### 追記
276
-
277
-
278
-
279
- [こちらの記事](https://blog.csdn.net/u013703185/article/details/85855981)を参考に、node_modules/.cacheを削除してyarn run devを実行しましたが、解決しませんでした。
378
+
280
-
281
-
282
-
283
- また、[こちらの記事](https://github.com/mzgoddard/hard-source-webpack-plugin/issues/416)を参考に、webpackをアップデートしようとしましたが、これ以上アップデートできず解決に至りませんでした。
379
+
284
-
285
-
286
-
380
+
287
- ### 補足情報(FW/ツールのバージョンなど)
381
+ 改めてタミナを確認してみると、以下warnが発生しておりましたので追記させていただきます。
288
-
289
-
290
-
382
+
383
+
384
+
291
- ```package
385
+ ```terminal
292
-
293
- {
386
+
294
-
295
- "name": "",
296
-
297
- "version": "1.0.0",
298
-
299
- "description": "My epic Nuxt.js project",
300
-
301
- "author": "",
302
-
303
- "private": true,
304
-
305
- "scripts": {
306
-
307
- "dev": "nuxt",
308
-
309
- "build": "nuxt build",
310
-
311
- "start": "nuxt start",
312
-
313
- "generate": "nuxt generate",
314
-
315
- "lint": "eslint --ext .js,.vue --ignore-path .gitignore ."
316
-
317
- },
318
-
319
- "dependencies": {
320
-
321
- "@nuxtjs/axios": "^5.8.0",
322
-
323
- "analyze": "^0.0.14",
324
-
325
- "chart.js": "^2.9.3",
326
-
327
- "config": "^3.2.4",
328
-
329
- "eslint-plugin-import": "^2.19.1",
330
-
331
- "eslint-plugin-vue": "^6.1.2",
332
-
333
- "eslint-scope": "^5.0.0",
334
-
335
- "firebase": "^7.6.0",
336
-
337
- "hard-source-webpack-plugin": "^0.13.1",
387
+ WARN [hardsource:204cee08] Using 28 MB of disk space.
338
-
339
- "latest": "^0.2.0",
388
+
340
-
341
- "nuxt": "^2.10.2",
389
+
342
-
343
- "stylus": "^0.54.7",
390
+
344
-
345
- "stylus-loader": "^3.0.2",
346
-
347
- "vue-chartjs": "^3.5.0",
348
-
349
- "webpack": "^4.41.5",
350
-
351
- "yarn": "^1.21.1"
352
-
353
- },
354
-
355
- "devDependencies": {
356
-
357
- "@nuxtjs/eslint-config": "^2.0.0",
358
-
359
- "@nuxtjs/eslint-module": "^1.1.0",
391
+ WARN [hardsource:204cee08] Tracking node dependencies with: yarn.lock.
360
-
361
- "@nuxtjs/vuetify": "^1.9.1",
392
+
362
-
363
- "babel-eslint": "^10.0.3",
393
+
364
-
365
- "eslint": "^6.7.2",
394
+
366
-
367
- "eslint-plugin-nuxt": ">=0.5.0"
395
+ WARN [hardsource:204cee08] Node dependencies changed. Building new cache.
368
-
369
- }
370
-
371
- }
372
-
373
-
374
396
 
375
397
  ```