Closed
Description
Please have a look at this gist for context: https://gist.github.com/julienw/7c31988d43b639dcfde2
Basically we have 2 files in 2 different directories. Yet in one another directory we have 2 links to these 2 files. If file1 has require('./file2')
it will fail because node's require is looking only in the "real" directory where file1 is. I suggest to augment this behavior to look both in this directory and where the symbolic link is located.
I understand it's not very easy to do given the current code as node doesn't keep track that it loaded the file from a symbolic link in the first place. I'd be happy to contribute with some guidance.