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
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 5.0.0-2018-10-08-12421 version and is up to date.
✔ Component tns-core-modules has 4.2.1 version and is up to date.
✔ Component tns-android has 4.2.0 version and is up to date.
✔ Component tns-ios has 4.2.0 version and is up to date.
Describe the bug tns preview --bundle breaks in Angular Projects with an error message: ERROR Error: Uncaught (in promise): Error: ActionBar(1) is not a valid View instance.
To Reproduce
I've only tested this on Android.
tns create test --ng
cd test
npm i -D nativescript-dev-webpack@next
tns preview --bundle
However, when I run tns run android --bundle or tns preview, the project runs correctly.
The text was updated successfully, but these errors were encountered:
The problem is that there are two instances of tns-core-modules - one external, in node_modules and one in vendor.js. We cannot get rid of the external one because it is part of the Preview app by default. To make sure we don't end up with embedded ones, we mark all imports from tns-core-modules as external in the webpack configuration. However, this won't work for any short imports, such as ui/action-bar. That's why all plugins should be migrated to use full imports, such as tns-core-modules/ui/action-bar. This PR in nativescript-angular resolves the problem with the hello-world template - NativeScript/nativescript-angular#1550.
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):✔ Component nativescript has 5.0.0-2018-10-08-12421 version and is up to date.
✔ Component tns-core-modules has 4.2.1 version and is up to date.
✔ Component tns-android has 4.2.0 version and is up to date.
✔ Component tns-ios has 4.2.0 version and is up to date.
Describe the bug
tns preview --bundle
breaks in Angular Projects with an error message:ERROR Error: Uncaught (in promise): Error: ActionBar(1) is not a valid View instance.
To Reproduce
I've only tested this on Android.
However, when I run
tns run android --bundle
ortns preview
, the project runs correctly.The text was updated successfully, but these errors were encountered: