3

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.

dennis
  • 31
  • 1
  • 2

1 Answers1

0

You need to install lib libpng-dev

On Ubuntu 18.04:

sudo apt-get update -y
sudo apt-get install -y libpng-dev

On alpine (in most docker images):

apk add --update \
           bash
           libpng-dev \
           gcc \
           g++ \
           make

Than instal js dependencies:

npm run install
AlSan
  • 383
  • 5
  • 9