Skip to content

Build fails when devDependency version is specified indirectly #5451

Open
@n0mer

Description

@n0mer

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.

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