Skip to content

Commit d29bc36

Browse files
authored
Merge pull request #2173 from NativeScript/raikov/fix-symlinks-modules
Fixed symlinks in node_modules
2 parents 7123731 + 62506ff commit d29bc36

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)