Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Getting weird errors #67

Closed
milewski opened this issue Jan 23, 2017 · 4 comments
Closed

Getting weird errors #67

milewski opened this issue Jan 23, 2017 · 4 comments

Comments

@milewski
Copy link

milewski commented Jan 23, 2017

JPG files works fine.. however png files.. throw this error

ERROR in ./assets/images/layout-assets/features-bg.png
    Module build failed: Error: Command failed: /Users/milewski/Documents/Code/monster-rally/node_modules/pngquant-bin/vendor/pngquant --output /var/folders/22/6b087x7s7fvbbsmbrx054w180000gn/T/1dc90c33-e079-4d55-9230-aa6f0d82865d /var/folders/22/6b087x7s7fvbbsmbrx054w180000gn/T/22669942-570a-4782-8cdf-e310353f2ab6 --quality 65-90 --speed 4

if i remove the pngquant config.. it works (and does get minified...)... however i have no control over the defaults..

progressive: true,
optimizationLevel: 4,
interlaced: false,
//pngquant: {
//    quality: '65-90',
//    speed: 4
//}
@milewski
Copy link
Author

i found the reason..

imagemin/imagemin-pngquant#32

@Narkoleptika
Copy link

@milewski

Just out of curiosity, what are the specs for the box you were trying to build on?

I was running into the exact same error trying to build on an Amazon EC2 Nano (1 cpu and 0.5GB memory).

The link you gave, unfortunately, didn't end up helping in my case.

It wasn't until I added 2GB of swap that it finally built correctly while retaining my original pngquant settings.

Not sure if this error is always due to insufficient memory or if that was only the case for me, but definitely something to look into if you're getting this error.

@milewski
Copy link
Author

milewski commented May 12, 2017

@Narkoleptika i was on a high end computer (local dev) dont remember the specs.. but however the problem wasnt related to memory, but pngquant "thows an error" if the range is tooo narrow... it has been closed in that issue i pointed but i cant confirm if that still happens nowadays... but the fix was... increase the max/min quality range... and you should be good to go~

if changing the range doesnt solve your problem u could use imagemin-pngcrush instead and u could hookup this custom plugin with imagemin-loader

@tcoopman
Copy link
Owner

I'm closing this, because the original issue looks solved. If you have any other issues, please create a separate ticket.

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

No branches or pull requests

3 participants