I am trying to install the imagemin-pngquant module for node :
https://www.npmjs.org/package/imagemin-pngquant
However, when I run the command
npm install imagemin-pngquant --save-dev
I get the below error:
warn : pngquant pre-build test failed
info : compiling from source
error : Error: pngquant failed to build, make sure that libpng-dev is installed
at ChildProcess.exithandler (child_process.js:637:15)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
How can I install the libpng-dev library that pngquant requires?