browserify / browserify/node-util

circular reference cause `inherits()` became empty object

Open
#80 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
255
Forks
92
PR merge metrics
No merged PRs in 30d

Description

the line below refs to `inherits()` from `inherits` module, but `inherits` module reference back to `util` module by checking the implementation on `util` module first, causing the first `require('inherits')` to returns empty object (default exports is empty object), if then `util.inherits()` gets call immediately it will throw.

problematic line in question:
https://github.com/browserify/node-util/blame/ef984721db7150f651800e051de4314c9517d42c/util.js#L592

the line needs to be updated to `require('inherits/inherits_browser')`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.