doctorrustynelson / yearn

Override node's require mechanism.
MIT License
7 stars 3 forks source link

require('when/node') fails as node is both a .js file and folder #90

Closed paulgoldsmith closed 9 years ago

paulgoldsmith commented 9 years ago

The npm module when has a folder node and file node.js. If the following is executed

ynode> require('when/node');

An uncaught exception is thrown as it attempts to yearn the folder instead of the file.

A real world example of this case is the npm module phridge which does this very require in spawn.js.

doctorrustynelson commented 9 years ago

The issue is really only occurring when running with legacy turned on and that's due to a different bug that will be addressed.