Pngquant failed to build make sure that libpng dev is installed

Pngquant failed to build make sure that libpng dev is installed

Error: pngquant failed to build, make sure that libpng-dev is installed

I’m trying to install laravel-nova in my Laravel project located in a Vagrant VM When I run the command npm install in the packages.json directory, I get the following error:

⚠ The `/home/vagrant/suitpackages/nova-components/Dashboard/node_modules/pngquant-bin/vendor/pngquant` binary doesn’t seem to work correctly ⚠ pngquant pre-build test failed ℹ compiling from source ✔ pngquant pre-build test passed successfully ✖ Error: pngquant failed to build, make sure that libpng-dev is installed at /home/vagrant/suitpackages/nova-components/Dashboard/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11 at processTicksAndRejections (internal/process/task_queues.js:93:5)

I tried to run: sudo apt-get install libpng-dev but libpng-dev is already installed.

1 Answer 1

You need to install lib libpng-dev

On alpine (in most docker images):

Than instal js dependencies:

Pngquant failed to build make sure that libpng dev is installed. Смотреть фото Pngquant failed to build make sure that libpng dev is installed. Смотреть картинку Pngquant failed to build make sure that libpng dev is installed. Картинка про Pngquant failed to build make sure that libpng dev is installed. Фото Pngquant failed to build make sure that libpng dev is installed

Not the answer you’re looking for? Browse other questions tagged npm laravel-nova or ask your own question.

Related

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

ReactJS: Pngquant failed to build, make sure that libpng-dev is installed

I am trying to setup a react project. It has lot of dependencies and while downloading one of module it is throwing this error. This is on windows.

pngquant failed to build, make sure that libpng-dev is installed

Output: ‼ unable to get local issuer certificate
pngquant pre-build test failed
compiling from source
pngquant pre-build test passed successfully
Error: pngquant failed to build, make sure that libpng-dev is installed

Pngquant failed to build make sure that libpng dev is installed. Смотреть фото Pngquant failed to build make sure that libpng dev is installed. Смотреть картинку Pngquant failed to build make sure that libpng dev is installed. Картинка про Pngquant failed to build make sure that libpng dev is installed. Фото Pngquant failed to build make sure that libpng dev is installed

4 Answers 4

Trending sort

Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.

It falls back to sorting by highest score if no posts are trending.

Switch to Trending sort

You didn’t installed lib-png so that error is coming.Try to install lib-png first.

Pngquant failed to build make sure that libpng dev is installed. Смотреть фото Pngquant failed to build make sure that libpng dev is installed. Смотреть картинку Pngquant failed to build make sure that libpng dev is installed. Картинка про Pngquant failed to build make sure that libpng dev is installed. Фото Pngquant failed to build make sure that libpng dev is installed

I experienced this issue when building a react project that uses the imagemin-pngquant package.

When I run npm install on the server I get the below error:

Here’s how I fixed it:

Install libpng-dev package on your machine/server:

Add pngquant-bin package to your npm packages in the package.json file (if it doesn’t yet exist):

OR

Run the command to install the pngquant-bin package:

Now everything should be fine if you install the npm packages and build the project again using:

Error: pngquant failed to build, make sure that libpng-dev is installed #48

Comments

AnowarCST commented Nov 6, 2018

npm is not installing. Error: pngquant failed to build, make sure that libpng-dev is installed. But I’ve installed libpng-devel.

ℹ compiling from source
✔ pngquant pre-build test passed successfully
Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (/var/www/html/laravel-boilerplate/node_modules/imagemin-pngquant/node_modules/bin-build/node_modules/execa/index.js:231:11)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted <"os":"darwin","arch":"any">(current: <"os":"linux","arch":"x64">)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pngquant-bin@4.0.0 postinstall: node lib/install.js
npm ERR! Exit status 1

as I’m using centos
$ yum install libpng-devel

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Package 2:libpng-devel-1.5.13-7.amzn2.0.2.x86_64 already installed and latest version
Nothing to do

The text was updated successfully, but these errors were encountered:

Cannot build project becuase of missing libpng-dev library // WIN10 #14015

Comments

maciekgrzybek commented May 13, 2019

Description

When I’m trying to build a new project with gatsby-cli, I’m getting error:

The same thing happens when trying to npm install on different gatsby project, cloned from repo.

Steps to reproduce

Expected result

The project should be installed and ready to run develop command.

Actual result

Isnstalation stopped because of the error:

pngquant-bin@5.0.2 postinstall C:\projects\my-blazing-fast-site\node_modules\pngquant-bin
node lib/install.js

‼ pngquant pre-build test failed
i compiling from source
× Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (C:\projects\my-blazing-fast-site\node_modules\execa\index.js:231:11)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted <"os":"darwin","arch":"any">(current: <"os":"win32","arch":"x64">)

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

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Maciek\AppDa

Environment

The text was updated successfully, but these errors were encountered:

Error: pngquant failed to build, make sure that libpng-dev is installed #23725

Comments

baliyan9887 commented May 4, 2020

Hi Gatsby team,
I’m stuck to create a new app using gatsby-cli. I’ve installed windows build tools according to the gatsby docs. but it does not work for me

pngquant-bin@5.0.2 postinstall E:\worked\appp\node_modules\pngquant-bin
node lib/install.js

‼ spawn UNKNOWN
‼ pngquant pre-build test failed
i compiling from source
× Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (E:\worked\appp\node_modules\bin-build\node_modules\execa\index.js:231:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.2.5 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.2.5 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted <"os":"darwin","arch":"any">(current: <"os":"win32","arch":"ia32">)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted <"os":"darwin","arch":"any">(current: <"os":"win32","arch":"ia32">)

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

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Gauta\AppData\Roaming\npm-cache_logs\2020-05-04T05_39_57_172Z-debug.log

Please help me out with this issue.

The text was updated successfully, but these errors were encountered:

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *