You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the project has dependency A and A has scoped dependency B, tns prepare <platform> is not flattening B.
For example the nativescript-angular has dependency @angular/core and after tns prepare <platform> in the tns_modules folder there is no folder @angular with subfolder core.
The text was updated successfully, but these errors were encountered:
The problem occurs when in your project you have dependency (for example "nativescript-angular") and it has scopede dependencies as its own dependencies (in it's package.json some dependencies are defined as @angular/<smth>). In order to make all dependencies usable in NativeScript project, CLI must flatten the dependencies and send them to correct folder in platforms directory. For example for Android this is platforms/android/src/main/assets/app/tns_modules/ - there you should find @angular directory in which you'll find all scoped packages.
However this was not working in CLI.
Steps to reproduce:
$ tns create myApp --ng
$ cd myApp
Edit project's package.json and in dependencies section keep ONLY tns-core-modules and nativescript-angular.
Try running the app on device or emulator - it will fail at runtime as it cannot find some modules. Now if you check platforms/android/src/main/assets/app/tns_modules/ you'll see there's no @angular dir at all
When the project has dependency A and A has scoped dependency B,
tns prepare <platform>
is not flattening B.For example the nativescript-angular has dependency @angular/core and after
tns prepare <platform>
in the tns_modules folder there is no folder @angular with subfolder core.The text was updated successfully, but these errors were encountered: