Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM 2.0 fails due to issue with "graceful-fs" #86

Closed
gbrail opened this issue Sep 30, 2014 · 1 comment
Closed

NPM 2.0 fails due to issue with "graceful-fs" #86

gbrail opened this issue Sep 30, 2014 · 1 comment

Comments

@gbrail
Copy link
Contributor

gbrail commented Sep 30, 2014

Offending code below. I mean seriously, I don't even see how multiple versions of Node.js on V8 can exist in the world, let alone stuff like Trireme.

Looks like the undocumented internal "natives" modules needs to work as well. I guess in the meantime we can keep on using a very old version of NPM.

(from "graceful-fs"/fs.js):

// eeeeeevvvvviiiiiiillllll
// more evil than monkey-patching the native builtin?
// Not sure.

var mod = require("module")
var pre = '(function (exports, require, module, __filename, __dirname) { '
var post = '});'
var src = pre + process.binding('natives').fs + post
var vm = require('vm')
var fn = vm.runInThisContext(src)
return fn(exports, require, module, __filename, __dirname)

@gbrail
Copy link
Contributor Author

gbrail commented Oct 1, 2014

Fine, let's add the "natives" module to let you look up the source code of any internal module.

@gbrail gbrail closed this as completed Oct 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant