Skip to content

Circular requires that work with regular requires do not work with sandboxed-module #50

@thoughtless

Description

@thoughtless

Node.js supports circular requires
The behavior can be odd or unexpected, but it is supported.

In some cases though, this library is loading these circular requires differently, causing them to fail.

I posted an example of such a situation here: https://github.com/thoughtless/circular_require_demo

Another example is the NPM module aws-sdk. It has a circular require between service.js and core.js.
require("sandboxed-module").require("aws-sdk") will fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions