You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
events.js:183
throw er; // Unhandled 'error' event
^
Error: Cannot find module './test2.js' from '/Users/alex/Development/audittool/test.js'
at /Users/alex/Development/audittool/node_modules/resolve/lib/async.js:65:35
at load (/Users/alex/Development/audittool/node_modules/resolve/lib/async.js:84:43)
at onex (/Users/alex/Development/audittool/node_modules/resolve/lib/async.js:109:17)
at /Users/alex/Development/audittool/node_modules/resolve/lib/async.js:12:69
at FSReqWrap.oncomplete (fs.js:152:21)
The problem seems to be that node-resolve is not getting the correct basedir in its options object. Modifying node_modules/module-deps/index.js to insert if (parent.package) parent.basedir = parent.package.__dirname; on line 170 (right before the self.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.
The text was updated successfully, but these errors were encountered:
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.js
creates this output:The problem seems to be that
node-resolve
is not getting the correctbasedir
in its options object. Modifyingnode_modules/module-deps/index.js
to 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.The text was updated successfully, but these errors were encountered: