Skip to content

Commit 985e4ab

Browse files
authored
Merge branch 'master' into spaceRange
2 parents e78b617 + 38c2085 commit 985e4ab

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.changeset/old-cherries-draw.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
Optional dep's path cannot find in newest npm

packages/app-builder-lib/src/node-module-collector/nodeModulesCollector.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ export abstract class NodeModulesCollector<T extends Dependency<T, OptionalsType
144144
log.debug({ name: d.name, reference }, "cannot find path for dependency")
145145
continue
146146
}
147+
148+
// fix npm list issue
149+
// https://github.com/npm/cli/issues/8535
150+
if (!fs.existsSync(p)) {
151+
log.debug({ name: d.name, reference, p }, "dependency path does not exist")
152+
continue
153+
}
154+
147155
const node: NodeModuleInfo = {
148156
name: d.name,
149157
version: reference,

0 commit comments

Comments
 (0)