Packaging a node package that has an unwritten dependency on another that needs to be installed

I’m trying to package the nodejs package aws-cli-local which has an unlisted dependency on aws-cdk. It does not have a strict dependency because it does not want to pin the version of aws-cdk that’s being used, and it’s a transparent convenience wrapper for localstack.

Because the package needs to import aws-cdk, this package must be installed at the same time. Note: both packages expect to be installed globally.

I have tried using node2nix for this, but I can’t seem to find the command line flags that give me what I want. The closest I’ve gotten is following this “advanced usage” section of the README

node2nix -i packages.json -14 --supplement-input dependencies.json

where packages.json contains ["aws-cdk-local"] and dependencies.json contains ["aws-cdk"], however when I nix-build, aws-cdk does not seem to be installed.

Does anyone have any suggestions?