funbox / optimizt

CLI image optimization tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation error, need help

SergioChizhikov opened this issue · comments

Win10, node 16.15.0 (the same at 16.14.0) npm 8.5.5

$ npm i -g @funboxteam/optimizt

npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm ERR! code 1
npm ERR! path C:\Users\Ya\AppData\Roaming\npm\node_modules@funboxteam\optimizt\node_modules\guetzli
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node lib/install.js
npm ERR! compiling from source
npm ERR! guetzli built successfully
npm ERR! Command failed: C:\Users\Ya\AppData\Roaming\npm\node_modules@funboxteam\optimizt\node_modules\guetzli\vendor\guetzli.exe --verbose
npm ERR! Guetzli JPEG compressor. Usage:
npm ERR! guetzli [flags] input_filename output_filename
npm ERR!
npm ERR! Flags:
npm ERR! --verbose - Print a verbose trace of all attempts to standard output.
npm ERR! --quality Q - Visual quality to aim for, expressed as a JPEG quality value.
npm ERR! --memlimit M - Memory limit in MB. Guetzli will fail if unable to stay under
npm ERR! the limit. Default is 6000 MB
npm ERR! --nomemlimit - Do not limit memory usage.
npm ERR!
npm ERR!
npm ERR! guetzli pre-build test failed
npm ERR! C:\Users\Ya\AppData\Roaming\npm\node_modules@funboxteam\optimizt\node_modules\execa\index.js:231
npm ERR! err = new Error(Command failed: ${joinedCmd}${output});
npm ERR! ^
npm ERR!
npm ERR! Error: Command failed: C:\Windows\system32\cmd.exe /s /c "mkdir -p C:\Users\Ya\AppData\Roaming\npm\node_modules@funboxteam\optimizt\node_modules\guetzli\vendor"
npm ERR! A subdirectory or file C:\Users\Ya\AppData\Roaming\npm\node_modules@funboxteam\optimizt\node_modules\guetzli\vendor already exists.
npm ERR! Error occurred while processing: C:\Users\Ya\AppData\Roaming\npm\node_modules@funboxteam\optimizt\node_modules\guetzli\vendor.
npm ERR!
npm ERR!
npm ERR! at C:\Users\Ya\AppData\Roaming\npm\node_modules@funboxteam\optimizt\node_modules\execa\index.js:231:11
npm ERR! at runMicrotasks ()
npm ERR! at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR! at async Promise.all (index 0) {
npm ERR! code: 1,
npm ERR! killed: false,
npm ERR! stdout: '',
npm ERR! stderr: 'A subdirectory or file C:\Users\Ya\AppData\Roaming\npm\node_modules\@funboxteam\optimizt\node_modules\guetzli\vendor already exists.\r\n' +
npm ERR! 'Error occurred while processing: C:\Users\Ya\AppData\Roaming\npm\node_modules\@funboxteam\optimizt\node_modules\guetzli\vendor.\r\n',
npm ERR! failed: true,
npm ERR! signal: null,
npm ERR! cmd: 'C:\Windows\system32\cmd.exe /s /c "mkdir -p C:\Users\Ya\AppData\Roaming\npm\node_modules\@funboxteam\optimizt\node_modules\guetzli\vendor"',
npm ERR! timedOut: false
npm ERR! }

According to imagemin/guetzli-bin#16 and imagemin/guetzli-bin#17, guetzli may not be installed correctly on Windows, I guess 🤔

We will try to investigate the problem and come back with the possible solutions later!

Hey, @SergioChizhikov!

@343dev has fixed this behavior in #49. Please, try to install v4.0.0, it should work fine.

If it is not, feel free to reopen this issue.