NativeScript / NativeScript/nativescript-cli

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

Open
#5,777 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the listed NativeScript CLI commands after changing @nativescript/android to "*" in package.json. Start with the dependency-handling path used by ns doctor android and ns build android, then verify that both commands complete successfully with the wildcard version.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.