funbox / optimizt

CLI image optimization tool
MIT License
933 stars 24 forks source link

Installation error, need help #48

Closed SergioChizhikov closed 2 years ago

SergioChizhikov commented 2 years ago

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! }

igoradamenko commented 2 years ago

According to https://github.com/imagemin/guetzli-bin/pull/16 and https://github.com/imagemin/guetzli-bin/pull/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!

igoradamenko commented 2 years ago

Hey, @SergioChizhikov!

@343dev has fixed this behavior in https://github.com/funbox/optimizt/pull/49. Please, try to install v4.0.0, it should work fine.

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