NativeScript / NativeScript/nativescript-cli
forced require of non-existant buffer
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 204
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 8
描述
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 6.8.0
- Cross-platform modules: 6.5.15
- Android Runtime: 6.5.3
- iOS Runtime: 6.5.2
Describe the bug
After updating the node_modules in my project including js-base64, starting the app resulted in an exception on trying to require the module buffer, which was never anywhere explicitly required.
According to the author (https://github.com/dankogai/js-base64/issues/126#issuecomment-674838031) the new version does check for existence of the Buffer object to maybe use it if available.
Expected behavior
Either do not add the require('buffer') or add buffer to the dependencies if not already there.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,使用列出的 NativeScript 版本复现应用启动,并检查从 js-base64 到不可用的 buffer 模块的依赖路径。检查 CLI 的依赖声明和启动处理;当应用不再尝试执行不可用的 require 时即完成,无论是因为依赖可用,还是因为没有引入 require。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, ios, javascript
- 领域
- cli, mobile
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100