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

v 1.0.0 fails with missing dependencies, see example with graceful-fs #33

Closed
robrich opened this issue Jun 12, 2014 · 4 comments
Closed

Comments

@robrich
Copy link
Contributor

robrich commented Jun 12, 2014

https://github.com/robrich/sandboxed-module-graceful-fs is a project showing how v. 1.0.0 fails with ENOENT, no such file or directory 'path/to/this/project/constants' on [line 262 of sandboxed_module.js] when dependencies don't exist. v. 0.3.0 didn't have this concern.

@domenic
Copy link
Collaborator

domenic commented Jun 12, 2014

Hmm interesting. There were a lot of changes. Hope it's an easy fix. Pull request would be much appreciated...

It might be just that we're missing constants from the list of built-in modules. If you're up for testing that fix it might be an easy PR.

@robrich
Copy link
Contributor Author

robrich commented Jun 12, 2014

Similar issue posted to graceful-fs: isaacs/node-graceful-fs#29

@robrich
Copy link
Contributor Author

robrich commented Jun 12, 2014

I haven't found any documentation on a native constants module, though because normal resolve doesn't die, I'm quite curious.

@robrich
Copy link
Contributor Author

robrich commented Jun 13, 2014

Wow, that's a bunny trail.

Based on that, check out #34 which asks Node for the list of native modules, and tests that we can SandboxedModule.require() a file that contains each one.

@robrich robrich closed this as completed Jun 13, 2014
domenic added a commit that referenced this issue Jul 2, 2014
It is generated via much hackery, but then checked in for a given release, to avoid how this seems way too fragile to do at runtime.

Fixes #33. Inspired greatly by @robrich's work in #34.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants