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.
Motivation
In case of
aws-cdk
is installed by a different package manager (ie brew on Mac OS) as a separate CLI toolcdklocal
complains that theaws-cdk
module is missing. To resolve this situation I found that the easiest solution is to add it by theNODE_PATH
variable that expands the lookup path for modules. (docs)Reported issue: #90
Changes