chenzhutian / hexo-all-minifier

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

Can't apply image_minifier #109

Closed kp-z closed 3 years ago

kp-z commented 3 years ago

Got an ENOENT error with runing hexo g which only happen when i turn the image_minifier on.

image_minifier:
  enable: true
  interlaced: false
  multipass: true
  optimizationLevel: 2
  pngquant: false
  progressive: false
  silent: false
  exclude:
    - '*.svg'
FATAL {
  err: Error: Command failed with ENOENT: /Users/Zkp/仓库/myweb/blog-cn/node_modules/hexo-all-minifier/node_modules/mozjpeg/vendor/cjpeg -baseline
  spawn /Users/Zkp/仓库/myweb/blog-cn/node_modules/hexo-all-minifier/node_modules/mozjpeg/vendor/cjpeg ENOENT
      at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
      at onErrorNT (node:internal/child_process:480:16)
      at processTicksAndRejections (node:internal/process/task_queues:81:21) {
    errno: -2,
    code: 'ENOENT',
    syscall: 'spawn /Users/Zkp/仓库/myweb/blog-cn/node_modules/hexo-all-minifier/node_modules/mozjpeg/vendor/cjpeg',
    path: '/Users/Zkp/仓库/myweb/blog-cn/node_modules/hexo-all-minifier/node_modules/mozjpeg/vendor/cjpeg',
    spawnargs: [ '-baseline' ],
    originalMessage: 'spawn /Users/Zkp/仓库/myweb/blog-cn/node_modules/hexo-all-minifier/node_modules/mozjpeg/vendor/cjpeg ENOENT',
    shortMessage: 'Command failed with ENOENT: /Users/Zkp/仓库/myweb/blog-cn/node_modules/hexo-all-minifier/node_modules/mozjpeg/vendor/cjpeg -baseline\n' +
      'spawn /Users/Zkp/仓库/myweb/blog-cn/node_modules/hexo-all-minifier/node_modules/mozjpeg/vendor/cjpeg ENOENT',
    command: '/Users/Zkp/仓库/myweb/blog-cn/node_modules/hexo-all-minifier/node_modules/mozjpeg/vendor/cjpeg -baseline',
    exitCode: undefined,
    signal: undefined,
    signalDescription: undefined,
    stdout: <Buffer >,
    stderr: <Buffer >,
    failed: true,
    timedOut: false,
    isCanceled: false,
    killed: false
  }
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html
yfengn commented 2 years ago

Hello, is there a solution?