pierrec / node-eval

Evaluate node require() module content directly
MIT License
93 stars 20 forks source link

Should not be logging. #8

Open reggi opened 9 years ago

reggi commented 9 years ago

I'm not sure whats causing this but when I run this, it logs the error below. The try should prevent any writing to stdout / stderr. This is really a pain. @pierrec any ideas on what could be causing it?

var _eval = require('eval')

try {
  _eval("require('missing-repo')", 'require-file.js', {}, true)
} catch (e) {

}

Logs this:


module.js:338
    throw err;
reggi commented 9 years ago

require-like doesn't log anything :(

var requireLike = require('require-like')
var myRequire = requireLike(__dirname + '/lib/bar.js')

try {
  var myFoo = myRequire('./foo.js')
} catch (e) {

}