localstack / aws-cdk-local

Thin wrapper script for using the AWS CDK CLI with LocalStack
Apache License 2.0
263 stars 17 forks source link

Throw somewhat better exception if aws-cdk is missing #92

Closed lakkeger closed 1 week ago

lakkeger commented 3 months ago

Motivation

In case of aws-cdk is installed by a different package manager (ie brew on Mac OS) as a separate CLI tool cdklocal complains that the aws-cdk module is missing. To resolve this situation I found that the easiest solution is to add it by the NODE_PATH variable that expands the lookup path for modules. (docs)

If the NODE_PATH environment variable is set to a colon-delimited list of absolute paths, then Node.js will search those paths for modules if they are not found elsewhere.

Reported issue: #90

Changes