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