Skip to content

v1.5.5 npm semver check not working properly #54

@massimocode

Description

@massimocode

Troubleshooting

  • I've searched discuss.bitrise.io for possible solutions.
  • Which version of the step is effected? 1.5.5
  • Is the issue reproducible with the latest version? YES
  • Does the issue happen sporadically, or every time? EVERY TIME
  • Is the issue reproducible locally by following our local debug guide? NOT APPLICABLE

Issue description

Define the npm version in package.json as follows:

  "engines": {
    "npm": ">=8.0.0 <=8.5.5"
  },

Or as follows:

  "engines": {
    "npm": "8.0.0 - 8.5.5"
  },

Both of the above are supported semver strings according to https://semver.npmjs.com/, but they both fail to be recognised by the steps

The following are the error messages

Autodetecting npm version
Checking package.json for npm version
error getting version: failed to parse package.json: `>=8.0.0 <=8.5.5` is not valid semver string: Malformed version: >=8.0.0 <=8.5.5
Could not read version information from package.json

From this build: https://app.bitrise.io/build/a1714f6e-8d5c-49bb-804c-a57b6b1cd931

and

Autodetecting npm version
Checking package.json for npm version
error getting version: failed to parse package.json: `8.0.0 - 8.5.5` is not valid semver string: Malformed version: 8.0.0 - 8.5.5
Could not read version information from package.json

From this build: https://app.bitrise.io/build/2df4ab42-acfa-4f53-acbe-b5ac48f4af84

Bitrise info

  • Build URL: See above
  • Bitrise Support enabled: Not sure
  • Log: Error pasted above

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions