browserify / browserify/node-util
circular reference cause `inherits()` became empty object
- 主要语言
- JavaScript
- 星标
- 255
- 派生
- 92
- PR 合并指标
- 30 天内没有已合并 PR
描述
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')`
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 issue 中链接的 util.js 第 592 行开始,检查涉及 inherits 和 util 的循环 require。按照指定内容更新所引用的模块路径,然后验证 require util 并调用 util.inherits 时,在初始化期间不再遇到空的导出。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, nodejs
- 领域
- backend
- Issue 类型
- 缺陷
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 65/100