Debuging webpack error

Can someone point me how to debug webpack error.
It’s started to happen just after I made yarn upgrade .

Looks like a problem with some image processing, error shown is below.
It’s happening only on build:production, but on build all works.

Error: spawn /Users/Me/www/wp/wp-content/themes/mytheme/node_modules/optipng-bin/vendor/optipng ENOENT
    at exports._errnoException (util.js:1022:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
error Command failed with exit code 1.
info Visit for documentation about this command.

Fixed by deleting node_modules folder and running yarn command again.