Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upmodule-deps seems incompatible with node-resolve #149
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
strugee commentedJul 16, 2018
See https://stackoverflow.com/q/51347558/1198896 for the detailed background, but basically, given the following minimal testcase:
test.js:test2.js: (empty)test3.js:Running
test3.jscreates this output:The problem seems to be that
node-resolveis not getting the correctbasedirin its options object. Modifyingnode_modules/module-deps/index.jsto insertif (parent.package) parent.basedir = parent.package.__dirname;on line 170 (right before theself.resolver()call) appears to fix this issue. I would PR but I don't know the source well enough to judge whether that's actually the correct place.