D
D
dsbk2019-12-01 20:40:07
gulp.js
dsbk, 2019-12-01 20:40:07

Why is gulp-image not being installed?

When I try to install gulp-image, I get the following:

C:\gulp-image-error>npm install --save-dev gulp-image

> [email protected] postinstall C:\gulp-image-error\node_modules\gifsicle
> node lib/install.js

  √ gifsicle pre-build test passed successfully

> [email protected] postinstall C:\gulp-image-error\node_modules\guetzli
> node lib/install.js

  ‼ Command failed: C:\gulp-image-error\node_modules\guetzli\vendor\guetzli.exe
--verbose
Guetzli JPEG compressor. Usage:
guetzli [flags] input_filename output_filename

Flags:
  --verbose    - Print a verbose trace of all attempts to standard output.
  --quality Q  - Visual quality to aim for, expressed as a JPEG quality value.
  --memlimit M - Memory limit in MB. Guetzli will fail if unable to stay under
                 the limit. Default is 6000 MB
  --nomemlimit - Do not limit memory usage.


  ‼ guetzli pre-build test failed
  i compiling from source
  ? Error: Command failed: C:\Windows\system32\cmd.exe /s /c "mkdir -p C:\gulp-i
mage-error\node_modules\guetzli\vendor"
???????? ??? ?? C:\gulp-image-error\node_modules\guetzli\vendor ? ???????.
???? ?? ??? ?????: C:\gulp-image-error\node_modules\guetzli\vendor.


    at C:\gulp-image-error\node_modules\execa\index.js:231:11
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 0)

> [email protected] postinstall C:\gulp-image-error\node_modules\jpeg-re
compress-bin
> node lib/install.js

  ? Error: spawn UNKNOWN
    at ChildProcess.spawn (internal/child_process.js:394:11)
    at Object.spawn (child_process.js:540:9)
    at module.exports (C:\gulp-image-error\node_modules\execa\index.js:139:26)
    at C:\gulp-image-error\node_modules\bin-check\index.js:16:11

> [email protected] postinstall C:\gulp-image-error\node_modules\mozjpeg
> node lib/install.js

  √ mozjpeg pre-build test passed successfully

> [email protected] postinstall C:\gulp-image-error\node_modules\optipng-bin
> node lib/install.js

  ‼ spawn UNKNOWN
  ‼ optipng pre-build test failed
  i compiling from source
  ? Error: Command failed: C:\Windows\system32\cmd.exe /s /c "./configure --with
-system-zlib --prefix="C:\gulp-image-error\node_modules\optipng-bin\vendor" --bi
ndir="C:\gulp-image-error\node_modules\optipng-bin\vendor""
"." ?? ????? ???????? ??? ?????
????????, ??????? ?????? ??? ?????? ????.


    at C:\gulp-image-error\node_modules\execa\index.js:231:11
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 0)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]
1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"
})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\node\AppData\Roaming\npm-cache\_logs\2019-12-01T17_00_01_8
30Z-debug.log

C:\gulp-image-error>

I do not attach the log specified in the message, there are 8000 lines.
I tried to install it on three different laptops (Win 10 x64, Win 7 x32, Win 7 x64) and a virtual machine (VirtualBox Win 7 x32 - completely from scratch to a clean system) - everywhere is the same.
Accordingly, during installation, some files are copied to node_modules, but gulp-image is not written to package.json, tasks with its participation are not processed.
Versions:
node -v
v12.13.0
npm -v
6.12.0
gulp -v
CLI version: 2.2.0
Local version:
4.0.2 no problem.
I tried now to install those versions of gulp and gulp-image from scratch that were a year ago - the situation is similar, it does not work.
Older projects involving gulp-image will still run fine.
Please help me figure out what the problem is and how to solve it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dsbk, 2019-12-03
@dsbk

As I was immediately told, build tools are required.
However, this comment, apparently, was deleted for some reason.
Suggested - thanks.
Just in case, I’ll write what you need to install gulp-image, maybe someone else will need it:
1. Install the .NET framework
2. Install build tools
On Windows 10, the latest version of build tools was installed without any problems:
On Win7 SP1 x64, it was possible to install only version 4:
It was not possible to install on Win7 SP1 x32.
After installing all of the above, the gulp-image module installed correctly and started working.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question