pipeline.exceptions.CompressorError: /usr/bin/env: yuglify: No such file or directory

You must install yugliy with the -g as you specified above

sudo npm -g install yuglify .

Without this the binary will not be linked to /bin .

This is happening because of a misnaming error, if you install from a package manager (npm) your bin may be called nodejs so you just need to symlink it like this:

ln -s /usr/bin/nodejs /usr/bin/node 

Source : stackoverflow.com