NativeScript / NativeScript/nativescript-cli

Asterisk in package.json version raises Cannot read property of null (reading 'filter')

未关闭
#5,777 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug
主要语言
JavaScript
星标
1.1k
派生
204
平均合并
1 天 9 小时
30 天内合并 PR
8

描述

Environment

  • CLI: 8.6.3

Describe the bug
When changing the @nativescript/android version in package.json to * the project can't be built anymore.

To Reproduce

  • ns create TestApp --vue
  • cd TestApp
  • npm install --save-dev @nativescript/android
  • ns doctor android < all good here
  • Open package.json and change
    "devDependencies": {
      "@nativescript/android": "^8.6.2",
    
    to
    "devDependencies": {
      "@nativescript/android": "*",
    
  • Running any command like ns doctor android or ns build android fails with
    Cannot read property of null (reading 'filter')
    

Expected behavior
The project should still build.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

将 package.json 中的 @nativescript/android 更改为 "*" 后,使用列出的 NativeScript CLI 命令重现该故障。先从 ns doctor android 和 ns build android 使用的依赖处理路径入手,然后验证两个命令都能使用通配符版本成功完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。