felixge / node-sandboxed-module

A sandboxed node.js module loader that lets you inject dependencies into your modules.
MIT License
342 stars 42 forks source link

module.paths is undefined inside sandbox #60

Open chge opened 7 years ago

chge commented 7 years ago

Some modules use undocumented property module.paths, but it seems that Module instance, that is used by sandboxed-module, lacks of that property.

I think the property (and maybe some others) could be simply monkeypatched to make sandbox look closer to the native environment.