I get errors when create bundle of app


#1

I get this error when I run tns run android --bundle --env.uglify, how can I get rid of them?

ERROR in node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(5,18): error TS2300: Duplicate identifier ‘ScrollingView’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(33,18): error TS2300: Duplicate identifier ‘NestedScrollingChild’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(74,18): error TS2300: Duplicate identifier ‘ViewPropertyAnimatorCompat’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(113,19): error TS2300: Duplicate identifier ‘ViewPropertyAnimatorCompat’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(114,139): error TS2694: Namespace ‘android.support.v4.view.ViewPropertyAnimatorCompat’ has
no exported member ‘ViewPropertyAnimatorCompatImpl’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(158,112): error TS2339: Property ‘BaseViewPropertyAnimatorCompatImpl’ does not exist on typ
e ‘typeof ViewPropertyAnimatorCompat’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(204,114): error TS2339: Property ‘JBViewPropertyAnimatorCompatImpl’ does not exist on type
‘typeof ViewPropertyAnimatorCompat’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(243,111): error TS2339: Property ‘ICSViewPropertyAnimatorCompatImpl’ does not exist on type
‘typeof ViewPropertyAnimatorCompat’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(282,115): error TS2339: Property ‘JBMr2ViewPropertyAnimatorCompatImpl’ does not exist on ty
pe ‘typeof ViewPropertyAnimatorCompat’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(321,117): error TS2339: Property ‘KitKatViewPropertyAnimatorCompatImpl’ does not exist on t
ype ‘typeof ViewPropertyAnimatorCompat’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(452,18): error TS2300: Duplicate identifier ‘NestedScrollingParent’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(498,18): error TS2300: Duplicate identifier ‘SwipeRefreshLayout’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v4.d.ts(599,19): error TS2300: Duplicate identifier ‘SwipeRefreshLayout’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(11,18): error TS2300: Duplicate identifier ‘RecyclerViewAccessibilityDelegate’
.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(57,18): error TS2300: Duplicate identifier ‘RecyclerView’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(86,32): error TS2314: Generic type ‘Adapter’ requires 1 type argument(s).
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(165,33): error TS2314: Generic type ‘Adapter’ requires 1 type argument(s).
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(235,19): error TS2300: Duplicate identifier ‘RecyclerView’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(468,39): error TS2314: Generic type ‘Adapter’ requires 1 type argument(s).
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(468,95): error TS2314: Generic type ‘Adapter’ requires 1 type argument(s).
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(718,18): error TS2300: Duplicate identifier ‘StaggeredGridLayoutManager’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(783,19): error TS2300: Duplicate identifier ‘StaggeredGridLayoutManager’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(844,18): error TS2300: Duplicate identifier ‘GridLayoutManager’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(879,19): error TS2300: Duplicate identifier ‘GridLayoutManager’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(923,18): error TS2300: Duplicate identifier ‘LinearLayoutManager’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/android-support-v7-recyclerview.d.ts(975,19): error TS2300: Duplicate identifier ‘LinearLayoutManager’.
node_modules/nativescript-ui-autocomplete/platforms/android/typings/autocomplete.d.ts(20,46): error TS2314: Generic type ‘Adapter’ requires 1 type argument(s).
node_modules/nativescript-ui-dataform/android.d.ts(1,22): error TS6053: File ‘D:/Dokumenty/Skola/DP/SkautIS_mobile/node_modules/nativescript-ui-dataform/node_modules/nativescript-ui-c
ore/android.d.ts’ not found.
node_modules/nativescript-ui-dataform/android.d.ts(2,22): error TS6053: File ‘D:/Dokumenty/Skola/DP/SkautIS_mobile/node_modules/nativescript-ui-dataform/node_modules/nativescript-ui-a
utocomplete/android.d.ts’ not found.
node_modules/nativescript-ui-dataform/ios.d.ts(1,22): error TS6053: File ‘D:/Dokumenty/Skola/DP/SkautIS_mobile/node_modules/nativescript-ui-dataform/node_modules/nativescript-ui-core/
ios.d.ts’ not found.
node_modules/nativescript-ui-dataform/ios.d.ts(2,22): error TS6053: File ‘D:/Dokumenty/Skola/DP/SkautIS_mobile/node_modules/nativescript-ui-dataform/node_modules/nativescript-ui-autoc
omplete/ios.d.ts’ not found.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(16862,18): error TS2300: Duplicate identifier ‘NestedScrollingChild’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(16973,18): error TS2300: Duplicate identifier ‘NestedScrollingParent’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(17326,18): error TS2300: Duplicate identifier ‘ScrollingView’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(18344,18): error TS2300: Duplicate identifier ‘ViewPropertyAnimatorCompat’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(18384,19): error TS2300: Duplicate identifier ‘ViewPropertyAnimatorCompat’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(20467,18): error TS2300: Duplicate identifier ‘SwipeRefreshLayout’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(20559,19): error TS2300: Duplicate identifier ‘SwipeRefreshLayout’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(27183,18): error TS2300: Duplicate identifier ‘GridLayoutManager’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(27221,19): error TS2300: Duplicate identifier ‘GridLayoutManager’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(27416,18): error TS2300: Duplicate identifier ‘LinearLayoutManager’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(27474,19): error TS2300: Duplicate identifier ‘LinearLayoutManager’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(28030,18): error TS2300: Duplicate identifier ‘RecyclerView’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(28207,19): error TS2300: Duplicate identifier ‘RecyclerView’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(28796,18): error TS2300: Duplicate identifier ‘RecyclerViewAccessibilityDelegate’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(28805,19): error TS2300: Duplicate identifier ‘RecyclerViewAccessibilityDelegate’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(29354,18): error TS2300: Duplicate identifier ‘StaggeredGridLayoutManager’.
node_modules/tns-platform-declarations/android/android-support-17.d.ts(29422,19): error TS2300: Duplicate identifier ‘StaggeredGridLayoutManager’.


#2

Looks like you have included same typings from different paths into your references.d.ts.


#3

Yea, I am not sure how included only from one.
I added this line:

/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />

because of Styling Dataform not working - can not find module android this issue.

So my reference.ts file looks like this:

/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
/// <reference path="./node_modules/nativescript-ui-core/ios.d.ts" />
/// <reference path="./node_modules/nativescript-ui-core/android.d.ts" />
/// <reference path="./node_modules/nativescript-ui-autocomplete/ios.d.ts" />
/// <reference path="./node_modules/nativescript-ui-autocomplete/android.d.ts" />
/// <reference path="./node_modules/nativescript-ui-dataform/ios.d.ts" />
/// <reference path="./node_modules/nativescript-ui-dataform/android.d.ts" />

#4

I’m not sure either but may I ask why you have added declarations from ui-core, autocomplete etc., was that really required?