Skip to content

Commit 61f2690

Browse files
fix: finding path of aws-cdk-lib module
1 parent 80ec50b commit 61f2690

File tree

3 files changed

+7
-1816
lines changed

3 files changed

+7
-1816
lines changed

src/package-lock.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/utils/findNpmPath.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ async function checkModuleInPackageJson(dir: string, moduleName: string) {
3636
const devDependencies = packageJson.devDependencies || {};
3737
if (dependencies[moduleName] || devDependencies[moduleName]) {
3838
const modulePath = path.join(dir, "node_modules", moduleName);
39+
40+
try {
41+
await fs.access(modulePath);
42+
} catch {
43+
return undefined;
44+
}
45+
3946
return modulePath;
4047
}
4148
return undefined;

0 commit comments

Comments
 (0)