Hi,

Trying to simply require() in a .js file seems to be failing for me here, 
raising a MODULE_NOT_FOUND error.
However - a fs.readFileSync() on the file does work.

My current failing debug code:
// Fails
require(require('path').resolve(module_file));

// Works
require('fs').readFileSync(require('path').resolve(module_file), 'UTF8');

Since the readFileSync() call works I can rule out any file/directory 
permissions leaving me with absolutely no ideas left as to why require() 
cannot find the file?

Anyone have any debugging pointers to share?

Darren

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to