Skip to content

Commit

Permalink
fix: fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
lakkeger committed Sep 26, 2024
1 parent 861821e commit 98ce115
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $ cdklocal --version
(Note: Depending on your local setup, you may or may not have to use the global `npm` installation flag `-g` above.)

### Mac OS specific `MODULE_NOT_FOUND` issue
On Mac OS, brew could be used to install AWS CDK, which will result in a `MODULE_NOT_FOUND` error from `cdklocal`.
On Mac OS, brew can be used to install AWS CDK, which might result in a `MODULE_NOT_FOUND` error from `cdklocal`.
To resolve this, set the `NODE_PATH` variable pointing to your AWS CDK's `node_module` folder to expand the lookup path for modules.
```bash
$ export NODE_PATH=$NODE_PATH:/opt/homebrew/Cellar/aws-cdk/<CDK_VERSION>/libexec/lib/node_modules
Expand Down
4 changes: 2 additions & 2 deletions bin/cdklocal
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ const patchPre_2_14 = () => {
} catch(e) {
if (e.code == "MODULE_NOT_FOUND") {
console.log(e);
console.log("`aws-cdk` module NOT found! Have you tried to add it to your `NODE_PATH`?");
process.exit(1);
console.error("`aws-cdk` module NOT found! Have you tried adding it to your `NODE_PATH`?");
throw e;
}
}

Expand Down

0 comments on commit 98ce115

Please sign in to comment.