picotool icon indicating copy to clipboard operation
picotool copied to clipboard

Unable to import modules from sister folders

Open dxu opened this issue 7 years ago • 2 comments

If i have two folders at the root of my directory, I'm unable to import modules from one folder to the other.


└── root/
    └── folderA/
        ├── module1
        └── module2
    └── folderB/
        ├── module3
        └── module4

When I require module3 in module1 by calling require(folderB/module3), I get an error.

I'm able to fix this error by commenting out the "require() relative filenames" check, and instead calling require('../folderB/module3'), but this is explicitly disallowed as documented.

dxu avatar Jul 30 '18 03:07 dxu