Skip to content

[npm5] Local dependency brakes build #3028

@dtopuzov

Description

@dtopuzov

From @surdu on August 1, 2017 7:57

After upgrading nativescript to 3.1.3 I have the following error in my project when I try to build:

Unable to apply changes on device: <device-id>. Error is: cp: cannot create directory 
'/Users/<user>/work/<project>/platforms/android/src/main/assets/app/tns_modules': No such 
file or directory.

Did a little investigation and realized the problem is a local dependency in my package JSON:

nativescript-local-notifications": "file:../nativescript-local-notifications"

Taking this out make the app build again.

The weird part is that's not the only local dependency in my project, I have another that doesn't brakes the build.

I can confirm the problem is only in 3.1.3 because I reverted back to 3.1.2 (twice) and the problem is not reproducible using that version.

For context, here is the full dependencies entry:

  "dependencies": {
    "moment": "^2.18.1",
    "nativescript-activity-detection": "file:../nativescript-activity-detection",
    "nativescript-android-utils": "^1.0.2",
    "nativescript-geolocation": "^3.0.0",
    "nativescript-local-notifications": "file:../nativescript-local-notifications",
    "nativescript-theme-core": "~1.0.2",
    "nativescript-webview-interface": "^1.4.1",
    "tns-core-modules": "^3.1.0"
  }

Copied from original issue: NativeScript/NativeScript#4634

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbuildDescribes issues related to build operations

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions