Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local dependency brakes build #4634

Closed
surdu opened this issue Aug 1, 2017 · 3 comments
Closed

Local dependency brakes build #4634

surdu opened this issue Aug 1, 2017 · 3 comments

Comments

@surdu
Copy link
Contributor

surdu commented Aug 1, 2017

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"
  }
@tsonevn
Copy link
Contributor

tsonevn commented Aug 1, 2017

Hi @surdu,
I tested your case on my side while using latest NativeScript CLI and local tgz file for the plugin, however, I was unable to reproduce this scenario. I am attaching my sample project together with the plugin.
Could you provide some info about the Android device, which you are using for testing? Also, could you check if in the main app folder of the project there is tns_modules folder? If so this could be the reason for this problem and you should delete it. Then you will be able to build the project successfully.
Archive.zip

@dtopuzov
Copy link
Contributor

dtopuzov commented Aug 2, 2017

This issue was moved to NativeScript/nativescript-cli#3028

@dtopuzov dtopuzov closed this as completed Aug 2, 2017
@lock
Copy link

lock bot commented Aug 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants