Skip to content

Commit 62506ff

Browse files
author
Tsvetan Raikov
committed
Fixed symlinks in node_modules
1 parent b33351c commit 62506ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/tools/node-modules/node-modules-dependencies-builder.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ export class NodeModulesDependenciesBuilder implements INodeModulesDependenciesB
100100
}
101101

102102
private moduleExists(modulePath: string): boolean {
103-
try {
103+
try {
104104
let exists = fs.lstatSync(modulePath);
105+
if (exists.isSymbolicLink()) {
106+
exists = fs.lstatSync(fs.realpathSync(modulePath));
107+
}
105108
return exists.isDirectory();
106109
} catch (e) {
107110
return false;

0 commit comments

Comments
 (0)