Closed francisrod01 closed 6 years ago
Take a look at https://github.com/PeterStaev/NativeScript-Drop-Down/releases/tag/v4.0 first bullet π
I'm updated with version information. I'm already using the 4.0 version.
The CSSType
decorator was added with TNS 4.0. So make sure you are really using TNS 4.0. Please post the output of tns info
when you run it inside your project.
So, this is my nativescript
dependency inside my project, again:
tns info
β Getting NativeScript components versions information...
β Update available for component nativescript. Your current version is 4.0.1 and the latest available version is 4.0.2.
β Update available for component tns-core-modules. Your current version is 3.4.1 and the latest available version is 4.0.1.
β Component tns-android has 4.0.1 version and is up to date.
β Component tns-ios is not installed.
And there is your problem - your tns-core-modules
are still at 3.4.1
. You need to update those as well.
Thank you! It's solved it! :+1: :1st_place_medal:
Can we use the dropdown in nativescript Vue ? I tried the following π im main.js :
Vue.registerElement('DropDown', () => require('nativescript-drop-down').DropDown)
in vue component : <DropDown ref="ddSalut" backgroundColor="primary" @items="saluts" @selectedIndexChanged="onSalutChanged(event)" @opened="onSalutOpen" @closed="onSalutClosed"
and got error :
JS: '{NSVue (Vue: 2.5.13 | NSVue: 1.3.1)} -> CreateElement(DropDown)' JS: [Vue warn]: Error in nextTick: "TypeError: Could not load view for: dropdown. TypeError: view_1.CSSType is not a function"
Thank you! It's solved it! π π₯
I've updated tns-core-modules, but still getting TypeError
Below is the error log
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function
System.err: TypeError: Object(...) is not a function
System.err: File: (file: node_modules\nativescript-drop-down\drop-down-common.js:23:11)
System.err:
System.err: StackTrace:
System.err: ../node_modules/nativescript-drop-down/drop-down-common.js(file: node_modules\nativescript-drop-down\drop-down-common.js:23:11)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file: node_modules\nativescript-drop-down\drop-down.android.js:1:0)
System.err: at ../node_modules/nativescript-drop-down/drop-down.js(file:///data/data/org.nativescript.LoginPage/files/app/vendor.js:147150:30)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ../node_modules/nativescript-drop-down/angular/fesm2015/nativescript-drop-down-angular.js(file: node_modules\nativescript-drop-down\angular\fesm2015\nativescript-drop-down-angular.js:1:0)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ./app/app.module.ts(file: src\app\app.module.ts:1:0)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file:///data/data/org.nativescript.LoginPage/files/app/bundle.js:476:73)
System.err: at ./main.ts(file:///data/data/org.nativescript.LoginPage/files/app/bundle.js:535:30)
System.err: at webpack_require__(file: src\webpack\bootstrap:750:0)
System.err: at checkDeferredModules(file: src\webpack\bootstrap:43:0)
System.err: at webpackJsonpCallback(file: src\webpack\bootstrap:30:0)
System.err: at (file:///data/data/org.nativescript.LoginPage/files/app/bundle.js:2:57)
System.err: at require(:1:266)
System.err:
System.err:
System.err: TypeError: Object(...) is not a function
System.err:
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function
System.err: TypeError: Object(...) is not a function
System.err: File: (file: node_modules\nativescript-drop-down\drop-down-common.js:23:11)
System.err:
System.err: StackTrace:
System.err: ../node_modules/nativescript-drop-down/drop-down-common.js(file: node_modules\nativescript-drop-down\drop-down-common.js:23:11)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file: node_modules\nativescript-drop-down\drop-down.android.js:1:0)
System.err: at ../node_modules/nativescript-drop-down/drop-down.js(file:///data/data/org.nativescript.LoginPage/files/app/vendor.js:147150:30)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ../node_modules/nativescript-drop-down/angular/fesm2015/nativescript-drop-down-angular.js(file: node_modules\nativescript-drop-down\angular\fesm2015\nativescript-drop-down-angular.js:1:0)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ./app/app.module.ts(file: src\app\app.module.ts:1:0)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file:///data/data/org.nativescript.LoginPage/files/app/bundle.js:476:73)
System.err: at ./main.ts(file:///data/data/org.nativescript.LoginPage/files/app/bundle.js:535:30)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at checkDeferredModules(file: src\webpack\bootstrap:43:0)
System.err: at webpackJsonpCallback(file: src\webpack\bootstrap:30:0)
System.err: at (file:///data/data/org.nativescript.LoginPage/files/app/bundle.js:2:57)
System.err: at require(:1:266)
System.err:
System.err:
System.err: TypeError: Object(...) is not a function
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6999)
System.err: at android.app.ActivityThread.access$1500(ActivityThread.java:257)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1982)
System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
System.err: at android.os.Looper.loop(Looper.java:236)
System.err: at android.app.ActivityThread.main(ActivityThread.java:8060)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
System.err: Caused by: com.tns.NativeScriptException: Error calling module function
System.err: TypeError: Object(...) is not a function
System.err: File: (file: node_modules\nativescript-drop-down\drop-down-common.js:23:11)
System.err:
System.err: StackTrace:
System.err: ../node_modules/nativescript-drop-down/drop-down-common.js(file: node_modules\nativescript-drop-down\drop-down-common.js:23:11)
System.err: at __webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file: node_modules\nativescript-drop-down\drop-down.android.js:1:0)
System.err: at ../node_modules/nativescript-drop-down/drop-down.js(file:///data/data/org.nativescript.LoginPage/files/app/vendor.js:147150:30)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ../node_modules/nativescript-drop-down/angular/fesm2015/nativescript-drop-down-angular.js(file: node_modules\nativescript-drop-down\angular\fesm2015\nativescript-drop-down-angular.js:1:0)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ./app/app.module.ts(file: src\app\app.module.ts:1:0)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file:///data/data/org.nativescript.LoginPage/files/app/bundle.js:476:73)
System.err: at ./main.ts(file:///data/data/org.nativescript.LoginPage/files/app/bundle.js:535:30)
System.err: at webpack_require(file: src\webpack\bootstrap:750:0)
System.err: at checkDeferredModules(file: src\webpack\bootstrap:43:0)
System.err: at webpackJsonpCallback(file: src\webpack\bootstrap:30:0)
System.err: at (file:///data/data/org.nativescript.LoginPage/files/app/bundle.js:2:57)
System.err: at require(:1:266)
System.err:
System.err:
System.err: TypeError: Object(...) is not a function
System.err: at com.tns.Runtime.runModule(Native Method)
System.err: at com.tns.Runtime.runModule(Runtime.java:674)
System.err: at com.tns.Runtime.run(Runtime.java:666)
System.err: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1193)
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6994)
System.err: ... 8 more
Help me fix the issue!
I'm trying to use it with NS + Angular.
I follow the Angular example in the docs.
https://github.com/PeterStaev/NativeScript-Drop-Down#usage-in-angular
Please I need to know what kind of bug is it.
I'm using this versions: