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