Skip to content

[Packager] should use compatible versions of node core modules #1871

Closed
@apaleslimghost

Description

@apaleslimghost

Many npm modules are currently not compatible with React Native because they depend on node's core modules. A good example of such a module is through, which depends on the stream module, and has nearly 1500 modules that depend on it. Currently, if a module like through is depended on, you get a slightly opaque runtime error such as Requiring unknown module 'stream', with no further information.

Browserify uses various npm modules in place of node core modules. I guess Webpack must be doing something similar.

Ideally, I'd like to see:

  • Packager resolving node modules with a list akin to Browserify's
  • "unknown module" errors be promoted to compile-time, with helpful debugging information, possibly including the module hierarchy that led to the unknown module

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions