NativeScript / NativeScript/nativescript-cli
Build fails when devDependency version is specified indirectly
還沒有人認領這個 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):
✔ Component nativescript has 7.0.12 version and is up to date.
✔ Component @nativescript/core has 7.0.13 version and is up to date.
✔ Component @nativescript/ios has 7.0.6 version and is up to date.
✔ Component @nativescript/android has 7.0.1 version and is up to date.
- XCode Version: 12.3
Describe the bug
ns build android return error:
Invalid Version: file:../../node_modules/@nativescript/android
The error appears when version in package.json refers to @node_modules folder (does not contain exact string). Such setup is common for monorepo-style projects (for example, @nrwl/nx) - but monorepo is not mandatory, error happens when version is specified indirectly.
For example:
"@nativescript/android": "file:../../node_modules/@nativescript/android",
"@nativescript/ios": "file:../../node_modules/@nativescript/ios",
"@nativescript/webpack": "file:../../node_modules/@nativescript/webpack",
instead of
"@nativescript/android": "7.0.1",
"@nativescript/ios": "7.0.6",
"@nativescript/webpack": "3.0.8",
Expected behavior
Version resolved w/out errors.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先檢查 issue 中顯示的 package.json 相依性項目,並使用 ns build android 重現失敗。追蹤 CLI 如何解析這些間接的 file: 版本;當相同的相依性可以在沒有 Invalid Version 錯誤的情況下解析時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- android, ios, javascript
- 領域
- cli, mobile-dev
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100