chenzhutian / hexo-all-minifier

A plugin for Hexo that optimizes HTML, CSS, JS and imagages, and it can optionally deploys your blog.
MIT License
279 stars 30 forks source link

Random Error: "MaxBufferError: stdout maxBuffer exceeded" #110

Closed ChenfengWei1 closed 3 years ago

ChenfengWei1 commented 3 years ago

Hello,

I have been using this plugin for a while and am very grateful for your work.

However, there is an inevitable random error when deploying my hexo page. This bug, which has been shown below, would lead to a failure of deployment:

MaxBufferErro

sys:

conf:

all_minifier: true
js_concator:
  enable: false

html_minifier:
  enable: true 
  collapseBooleanAttributes: false
  collapseWhitespace: true
  removeComments: true
  removeEmptyAttributes: true
  removeScriptTypeAttributes: false
  removeStyleLinkTypeAttributes: false
  minifyJS: false
  minifyCSS: false
  ignore_error: false
  silent: false
  exclude:

css_minifier:
  enable: true
  exclude: 
    - '*.min.css'

js_minifier:
  enable: true
  mangle: true
  output:
  compress:
  exclude:
    - "*.min.js"
    - "ins.js"
    - "ins.ejs"

image_minifier:
  enable: true
  interlaced: false
  multipass: false
  optimizationLevel: 2
  pngquant: true
  progressive: false
  silent: false

Somehow, I managed to solve this problem by adding a 'exclude' part in the 'image_minifer' section.

  exclude: 
    - "*.jpg"
    - "*.gif"

Both jpg and gif files have been filtered and somehow it worked. So I just want to report this bug and its potential solution, notwithstanding I have no idea of its cause.