How can I define npm cli nodejs run time for packages built with buildNpmPackage?

Hi everyone,

Currently I use docker to run squoosh/cli (base image nodejs-12) and it was working fine.

I am trying to use buildNpmPackage to build the CLI to replace docker but I run into this bug and it won’t get fixed. I notice the nodejs version is v18.16.1 and I was wondering if it is possible to change the nodejs run time for this CLI and how?

I’ve tried override as below but the run time is still node.js 18 so I probably did something wrong.

let
  buildNpmPackage' = buildNpmPackage.override { nodejs = nodejs_14; };
in buildNpmPackage rec {

Can anyone please advise how to use different nodejs version to run this CLI?

Thanks