Trellis Deploy Error: dyld library not loaded

Hey guys,

Just switched machines for my dev environment. This is probably the first time I’ve done this mid-development.

Everything is running smoothly until I deploy. I am getting this error:

optimizationError: dyld: Library not loaded:
/usr/local/opt/libpng/lib/libpng16.16.dylib
  Referenced from: /Users/masoninthesis/Sites/lyps_v1.1/site/web/app/themes/s
age/node_modules/mozjpeg/vendor/cjpeg
  Reason: image not found

    at Promise.all.then.arr (/Users/masoninthesis/Sites/lyps_v1.1/site/web/ap
p/themes/sage/node_modules/execa/index.js:170:11)
    at process._tickCallback (internal/process/next_tick.js:103:7)
error Command failed with exit code 1.

Full error log here.

Can’t find any hints on Google. Any guidance would be much appreciated. It appears to be Yarn related, so meanwhile I’ll try cleaning the theme and reloading node modules.

Found a temporary solution.

First I used these instructions to reinstall and relink libpng:

But then I got the same error but regarding pngquant, found the temporary solution here:
https://github.com/roots/sage/issues/1780

In webpack.config.optimize.js I changed pngquant: { quality: '65-90', speed: 4 }, to pngquant: null,