Skip to content

Fail to add plugin with prerelease version because of "Invalid Version" #867

Open
@ath0mas

Description

@ath0mas

Bug Report

Problem

What is expected to happen?

Basic cordova plugin add <plugin-name> of a plugin published on NPM with prerelease version should install without error.

What does actually happen?

Fail to add plugin because of Invalid Version: null.

Information

It works fine forcing @<exact-version> spec, or for same kind of plugin but with a release version.

Command or Code

$ cordova plugin add cordova-plugin-ns0m-media-capture
Invalid Version: null
$ cordova plugin add cordova-plugin-ns0m-file-transfer
Invalid Version: null

$ cordova plugin add cordova-plugin-ns0m-disk-space
Adding cordova-plugin-ns0m-disk-space to package.json

while npm installs are running fine, fetching 3.0.4-3, 2.0.0-2, and 1.1.0 respectively,
and same for

$ cordova plugin add [email protected]
Adding cordova-plugin-ns0m-media-capture to package.json
$ cordova plugin add [email protected]
Adding cordova-plugin-ns0m-file-transfer to package.json

$ cordova plugin add [email protected]
Adding cordova-plugin-ns0m-disk-space to package.json

Environment, Platform, Device

Windows 10, Node 14 & 15, NPM 6 & 7

Version information

Cordova Packages:

    cli: 10.0.0
        common: 4.0.2
        create: 3.0.0
        lib: 10.0.0
            common: 4.0.2
            fetch: 3.0.1
            serve: 4.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions