Tried to run this command on ubuntu 18.04
npm install -g pngquant-bin
but I got this error,
[..................] | fetchMetada
Got the same error sh: 1: node: Permission denied
sh: 1: node: Permission denied
So this worked for me
npm config set user 0 npm config set unsafe-perm true