browserify / browserify/node-util

circular reference cause `inherits()` became empty object

Aperta
#80 6 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
255
Fork
92
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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')`

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.