Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm i compress-images #21

Closed
smartnexus opened this issue Dec 13, 2018 · 16 comments
Closed

npm i compress-images #21

smartnexus opened this issue Dec 13, 2018 · 16 comments

Comments

@smartnexus
Copy link

Command isn't working. Output:

`npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5

cwebp-bin@5.0.0 postinstall /Users/smartnexus/Desktop/OrchestraManager/node_modules/cwebp-bin
node lib/install.js

✔ cwebp pre-build test passed successfully

giflossy@3.0.41 postinstall /Users/smartnexus/Desktop/OrchestraManager/node_modules/giflossy
node lib/install.js

✔ giflossy pre-build test passed successfully

gifsicle@4.0.1 postinstall /Users/smartnexus/Desktop/OrchestraManager/node_modules/gifsicle
node lib/install.js

✔ gifsicle pre-build test passed successfully

guetzli@1.0.1 postinstall /Users/smartnexus/Desktop/OrchestraManager/node_modules/guetzli
node lib/install.js

⚠ The /Users/smartnexus/Desktop/OrchestraManager/node_modules/guetzli/vendor/guetzli binary doesn't seem to work correctly
⚠ guetzli pre-build test failed
ℹ compiling from source
✖ Error: mkdir -p /Users/smartnexus/Desktop/OrchestraManager/node_modules/guetzli/vendor && make && mv bin/Release/guetzli /Users/smartnexus/Desktop/OrchestraManager/node_modules/guetzli/vendor/guetzli
Command failed: make && mv bin/Release/guetzli /Users/smartnexus/Desktop/OrchestraManager/node_modules/guetzli/vendor/guetzli
Package libpng was not found in the pkg-config search path.
Perhaps you should add the directory containing libpng.pc' to the PKG_CONFIG_PATH environment variable No package 'libpng' found Package libpng was not found in the pkg-config search path. Perhaps you should add the directory containing libpng.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpng' found
Package libpng was not found in the pkg-config search path.
Perhaps you should add the directory containing libpng.pc' to the PKG_CONFIG_PATH environment variable No package 'libpng' found Package libpng was not found in the pkg-config search path. Perhaps you should add the directory containing libpng.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpng' found
Package libpng was not found in the pkg-config search path.
Perhaps you should add the directory containing libpng.pc' to the PKG_CONFIG_PATH environment variable No package 'libpng' found Package libpng was not found in the pkg-config search path. Perhaps you should add the directory containing libpng.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpng' found
Package libpng was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpng.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpng' found
guetzli/guetzli.cc:23:10: fatal error: 'png.h' file not found
#include "png.h"
^~~~~~~
1 error generated.
make[1]: *** [obj/Release/guetzli.o] Error 1
make: *** [guetzli] Error 2

at ChildProcess.exithandler (child_process.js:270:12)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:927:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

jpeg-recompress-bin@4.0.0 postinstall /Users/smartnexus/Desktop/OrchestraManager/node_modules/jpeg-recompress-bin
node lib/install.js

✔ jpeg-recompress pre-build test passed successfully

jpegoptim-bin@5.1.0 postinstall /Users/smartnexus/Desktop/OrchestraManager/node_modules/jpegoptim-bin
node lib/install.js

⚠ Command failed: /Users/smartnexus/Desktop/OrchestraManager/node_modules/jpegoptim-bin/vendor/jpegoptim --version
dyld: Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.9.dylib
Referenced from: /Users/smartnexus/Desktop/OrchestraManager/node_modules/jpegoptim-bin/vendor/jpegoptim
Reason: image not found

⚠ jpegoptim pre-build test failed
ℹ compiling from source
✖ Error: Command failed: /bin/sh -c ./configure --prefix="/Users/smartnexus/Desktop/OrchestraManager/node_modules/jpegoptim-bin/vendor" --bindir="/Users/smartnexus/Desktop/OrchestraManager/node_modules/jpegoptim-bin/vendor"

checking build system type... x86_64-apple-darwin18.2.0
checking host system type... x86_64-apple-darwin18.2.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
Angels-MacBook-Air:OrchestraManager smartnexus$ npm i compress-images
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5

jpegoptim-bin@5.1.0 postinstall /Users/smartnexus/Desktop/OrchestraManager/node_modules/jpegoptim-bin
node lib/install.js

⚠ Command failed: /Users/smartnexus/Desktop/OrchestraManager/node_modules/jpegoptim-bin/vendor/jpegoptim --version
dyld: Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.9.dylib
Referenced from: /Users/smartnexus/Desktop/OrchestraManager/node_modules/jpegoptim-bin/vendor/jpegoptim
Reason: image not found

⚠ jpegoptim pre-build test failed
ℹ compiling from source
✖ Error: Command failed: /bin/sh -c ./configure --prefix="/Users/smartnexus/Desktop/OrchestraManager/node_modules/jpegoptim-bin/vendor" --bindir="/Users/smartnexus/Desktop/OrchestraManager/node_modules/jpegoptim-bin/vendor"

checking build system type... x86_64-apple-darwin18.2.0
checking host system type... x86_64-apple-darwin18.2.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for jpeg_read_header in -ljpeg... no
Cannot find libjpeg or you have too old version (v6 or later required).

at Promise.all.then.arr (/Users/smartnexus/Desktop/OrchestraManager/node_modules/execa/index.js:231:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)

npm WARN OrchestraManager@1.0.0 No description

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jpegoptim-bin@5.1.0 postinstall: node lib/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jpegoptim-bin@5.1.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
`

@Yuriy-Svetlov
Copy link
Owner

Yuriy-Svetlov commented Dec 25, 2018

@smartnexus

How is your script? How i can reproduce this problem?

@javiercerdas
Copy link

Hello,
I'm getting the same errors. This happens during initial installation: npm install compress-images

I'm using node v8.11.1, but I just tried it with the latest LTS v10.15.0 and the same errors happen.

I'm in need of an image compression tool for my project and this one would be ideal. Thanks for the help. If I can provide any more information please let me know.

@Yuriy-Svetlov
Copy link
Owner

Yuriy-Svetlov commented Dec 29, 2018

Hello,
@javiercerdas
@smartnexus

How are you OS?

I tested on Win 8.1 and use NodeJs v9.3.0 - works well for me.

@Yuriy-Svetlov
Copy link
Owner

Try hand to install - https://github.com/tjko/jpegoptim

Say to me result. Could you install or not.

@javiercerdas
Copy link

Hello again. Locally I'm on a mac (HIgh Sierra). After installing libjpeg (which is required by jpgoptim), the npm install was successful. So it's related to missing libraries on my system. Also of note, I also tried the install on my Ubuntu machine and there it install without any problems ( I did NOT need to do any extra installations of any library).

Thanks for the help!

@vsanse
Copy link

vsanse commented May 19, 2019

issue seems to persist on Windows machines when installing package globally.

@ozymandias547
Copy link

Is installing libjpeg manually required now? I think this issue should stay open.

@buglessir
Copy link

@semiromid , I've the same issue on Windows 7 with Node LTS v10.16.3
It's a big problem, because I can't install again compress-images and use that !!!
Thanks

@buglessir
Copy link

Hello again. Locally I'm on a mac (HIgh Sierra). After installing libjpeg (which is required by jpgoptim), the npm install was successful. So it's related to missing libraries on my system. Also of note, I also tried the install on my Ubuntu machine and there it install without any problems ( I did NOT need to do any extra installations of any library).

Thanks for the help!

Hi, did you solve this issue ? I've this problem on Windows 7 too ...

@Yuriy-Svetlov Yuriy-Svetlov reopened this Apr 2, 2020
@Yuriy-Svetlov
Copy link
Owner

@buglessir Hello. I will try to solve this problem.

@beatrizsmerino
Copy link

I think that I have the same problem :(

Captura de pantalla 2020-04-13 a las 9 46 34
Captura de pantalla 2020-04-13 a las 9 46 52
Captura de pantalla 2020-04-13 a las 9 47 22
Captura de pantalla 2020-04-13 a las 9 47 38

@Yuriy-Svetlov
Copy link
Owner

jpegoptim-1.3.0-win32-binary
is worked on Win 7 x32

@Yuriy-Svetlov
Copy link
Owner

Yuriy-Svetlov commented Apr 14, 2020

jpegoptim-win32 - V1.4.4 + 64bit

jpegoptim: cannot rename temp file

Use Win 7 x32

vikas5914/jpegoptim-win#3

@Yuriy-Svetlov
Copy link
Owner

Yuriy-Svetlov commented Apr 14, 2020

jpegoptim-bin (wrapper - this use in compress-images)
jpegoptim.exe is for Win x64 not for Win x32

@Yuriy-Svetlov
Copy link
Owner

To use jpegoptim you must npm install jpegoptim-bin --save this library does not work properly on some OS and platforms. from https://github.com/imagemin/jpegoptim-bin

May be a problems with installation and use on
Win 8.1 x64
Win 7 x32
and other OS:

Additional problem
tjko/jpegoptim#54

@Yuriy-Svetlov
Copy link
Owner

Try install and use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants