Pygments don't work when Hugo is called from NodeJS

Hi folks,

So this may be a nodejs specific issue, so apologies if this is in the wrong place.

I deploy my Hugo site via a nodejs script, which in turn calls the Hugo binary. When called in this way, Hugo warns that it cannot find the pygmentize binary, even though it is installed in /usr/local/bin on my server…

Any help would be much appreciated.