ubuntu 16.10 libpng12.so.0: cannot open shared object file
Running on: "image-webpack-loader": "^3.2.0", I always get these errors:
Error in ./images/chat-sprite.png
Module build failed: Error: /home/capaj/git_projects/be/chat-window/node_modules/pngquant-bin/vendor/pngquant: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
@ ./styles/main.less 6:22437-22473 6:23930-23966 6:28534-28570 6:32673-32709 6:34586-34622 6:36817-36853 6:37912-37948
I researched a bit and tried installing
sudo apt-get install libpng12-0
sudo apt-get install libpng-dev
I eve tried sudo apt install pngquant
but no luck. Has anyone been able to make this work on latest ubuntu?
encounter with the same issue
Closing because this is a yarn issue. So when I did:
npm i image-webpack-loader pngquant
it works fine. Seems like yarn is not able to execute the postinstall npm script correctly. @timur-orudzhov are also on yarn? or NPM?
@capaj on npm
I'm having the same issue, even with that trick https://github.com/tcoopman/image-webpack-loader/issues/76#issuecomment-281109236 mentioned. Weirdly it works on my local machine but not on docker build.
Well. My issue was actually my mistake and might be yours if you are using docker.
I was replacing docker's node_modules folder when running COPY . /usr/app so the local binary was linked to this lib that obviously wasn't available at the docker machine. Simple adding node_modules to .dockerignore fixed it.
So apparently its an issue with later versions of Ubuntu - see https://askubuntu.com/a/895903/250605. @capaj
I had this issue, but I happed to have missing automake
sudo apt-get install automake
After, it works both with yarn and npm
yarn --version
0.24.5
@enapupe Cheers, you helped solve my issue! I had placed the node_modules in my dockerignore file, but when mounting the root project directory the node_modules where added back in. So I mounted my projects src directory instead.