0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Vue.js】エラー内容がHtml Webpack Plugin:やhtmlparser.js の類が出てきた

Last updated at Posted at 2020-10-01

ターミナルやホスティングしたあとのページに

htmlparser.jsや
Html Webpack Plugin:〇〇
とか出てきて、エラーコピペしてググっても全然出てこなかったため、備忘録に


> vue-pwa-tutorial@0.1.0 build /Users/〇〇/Desktop/vue-pwa-tutorial
> vue-cli-service build


⠏  Building for production...

 ERROR  Failed to compile with 1 errors                                                                                             0:10:39

  Error: Parse Error: <html lang="en" background: rgb(245, 246, 248);"
  
  - htmlparser.js:240 new HTMLParser
    [vue-pwa-tutorial]/[html-minifier]/src/htmlparser.js:240:13
  
  - htmlminifier.js:966 minify
    [vue-pwa-tutorial]/[html-minifier]/src/htmlminifier.js:966:3
  
  - htmlminifier.js:1326 exports.minify
    [vue-pwa-tutorial]/[html-minifier]/src/htmlminifier.js:1326:16
  
  - index.js:316 
    [vue-pwa-tutorial]/[html-webpack-plugin]/index.js:316:18
  
  - task_queues.js:93 processTicksAndRejections
    internal/process/task_queues.js:93:5

原因

ターミナルで見れば一目瞭然なのですが、
htmlタグの中に、謎のコードが打ち込まれてました。
つまり、凡ミス。
タイポや、どこかエラーがあるのに見逃している可能性が高いです。

 <html lang="en" background: rgb(245, 246, 248);" //こんなのが紛れてた。

Firebase Hostingにデプロイした際に、バグり
しかも、なぜかローカルでは普通に動いていて、
原因見つけるまで時間かかったため記録しておきます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?