For pure NPM installations, simply deploy a Nix package first when invoking functions or inline JS