Skip to content

Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function #2241

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

Open
kapil9-10 opened this issue Sep 7, 2020 · 1 comment

Comments

@kapil9-10
Copy link

this is NativeScript Angular 9

Error is coming with the nativescript-ui-calendar plugin
I really want to use it but everytime I put this in import this error comes up
need help

Error

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: nativescript_core__WEBPACK_IMPORTED_MODULE_0_.Property is not a constructor
System.err: File: (file: node_modules\nativescript-ui-calendar\ui-calendar.common.js:283:0)
System.err:
System.err: StackTrace:
System.err: ../node_modules/nativescript-ui-calendar/ui-calendar.common.js(file: node_modules\nativescript-ui-calendar\ui-calendar.common.js:283:0)
System.err: at webpack_require(file: src\webpack\bootstrap:816:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file: node_modules\nativescript-ui-calendar\ui-calendar.android.js:1:0)
System.err: at ../node_modules/nativescript-ui-calendar/ui-calendar.js(file:///data/data/org.nativescript.Nplayground/files/app/vendor.js:158595:30)
System.err: at webpack_require(file: src\webpack\bootstrap:816:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ../node_modules/nativescript-ui-calendar/angular/fesm2015/nativescript-ui-calendar-angular.js(file: node_modules\nativescript-ui-calendar\angular\fesm2015\nativescript-ui-calendar-angular.js:1:0)
System.err: at webpack_require(file: src\webpack\bootstrap:816: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:816:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file:///data/data/org.nativescript.Nplayground/files/app/bundle.js:300:73)
System.err: at ./main.ts(file:///data/data/org.nativescript.Nplayground/files/app/bundle.js:366:30)
System.err: at webpack_require(file: src\webpack\bootstrap:816: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.Nplayground/files/app/bundle.js:2:57)
System.err: at require(:1:266)
System.err:
System.err:
System.err: TypeError: nativescript_core__WEBPACK_IMPORTED_MODULE_0_.Property is not a constructor
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: nativescript_core__WEBPACK_IMPORTED_MODULE_0_.Property is not a constructor
System.err: File: (file: node_modules\nativescript-ui-calendar\ui-calendar.common.js:283:0)
System.err:
System.err: StackTrace:
System.err: ../node_modules/nativescript-ui-calendar/ui-calendar.common.js(file: node_modules\nativescript-ui-calendar\ui-calendar.common.js:283:0)
System.err: at webpack_require(file: src\webpack\bootstrap:816:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file: node_modules\nativescript-ui-calendar\ui-calendar.android.js:1:0)
System.err: at ../node_modules/nativescript-ui-calendar/ui-calendar.js(file:///data/data/org.nativescript.Nplayground/files/app/vendor.js:158595:30)
System.err: at webpack_require(file: src\webpack\bootstrap:816:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ../node_modules/nativescript-ui-calendar/angular/fesm2015/nativescript-ui-calendar-angular.js(file: node_modules\nativescript-ui-calendar\angular\fesm2015\nativescript-ui-calendar-angular.js:1:0)
System.err: at webpack_require(file: src\webpack\bootstrap:816: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:816:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file:///data/data/org.nativescript.Nplayground/files/app/bundle.js:300:73)
System.err: at ./main.ts(file:///data/data/org.nativescript.Nplayground/files/app/bundle.js:366:30)
System.err: at webpack_require(file: src\webpack\bootstrap:816: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.Nplayground/files/app/bundle.js:2:57)
System.err: at require(:1:266)
System.err:
System.err:
System.err: TypeError: nativescript_core__WEBPACK_IMPORTED_MODULE_0_.Property is not a constructor
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5743)
System.err: at android.app.ActivityThread.-wrap1(Unknown Source:0)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
System.err: at android.os.Looper.loop(Looper.java:164)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6494)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
System.err: Caused by: com.tns.NativeScriptException: Error calling module function
System.err: TypeError: nativescript_core__WEBPACK_IMPORTED_MODULE_0_.Property is not a constructor
System.err: File: (file: node_modules\nativescript-ui-calendar\ui-calendar.common.js:283:0)
System.err:
System.err: StackTrace:
System.err: ../node_modules/nativescript-ui-calendar/ui-calendar.common.js(file: node_modules\nativescript-ui-calendar\ui-calendar.common.js:283:0)
System.err: at webpack_require(file: src\webpack\bootstrap:816:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file: node_modules\nativescript-ui-calendar\ui-calendar.android.js:1:0)
System.err: at ../node_modules/nativescript-ui-calendar/ui-calendar.js(file:///data/data/org.nativescript.Nplayground/files/app/vendor.js:158595:30)
System.err: at webpack_require(file: src\webpack\bootstrap:816:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at ../node_modules/nativescript-ui-calendar/angular/fesm2015/nativescript-ui-calendar-angular.js(file: node_modules\nativescript-ui-calendar\angular\fesm2015\nativescript-ui-calendar-angular.js:1:0)
System.err: at webpack_require(file: src\webpack\bootstrap:816: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:816:0)
System.err: at fn(file: src\webpack\bootstrap:120:0)
System.err: at (file:///data/data/org.nativescript.Nplayground/files/app/bundle.js:300:73)
System.err: at ./main.ts(file:///data/data/org.nativescript.Nplayground/files/app/bundle.js:366:30)
System.err: at webpack_require(file: src\webpack\bootstrap:816: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.Nplayground/files/app/bundle.js:2:57)
System.err: at require(:1:266)
System.err:
System.err:
System.err: TypeError: nativescript_core__WEBPACK_IMPORTED_MODULE_0_.Property is not a constructor
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:1119)
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740)
System.err: ... 8 more

configuration

{
"nativescript": {
"id": "org.nativescript.Nplayground",
"tns-android": {
"version": "6.5.0"
},
"tns-ios": {
"version": "6.5.0"
}
},
"description": "NativeScript Application",
"license": "SEE LICENSE IN ",
"repository": "",
"scripts": {
"ngcc": "ngcc --properties es2015 module main --first-only",
"postinstall": "npm run ngcc"
},
"dependencies": {
"@angular/animations": "~9.1.0",
"@angular/common": "~9.1.0",
"@angular/compiler": "~9.1.0",
"@angular/core": "~9.1.0",
"@angular/forms": "~9.1.0",
"@angular/platform-browser": "~9.1.0",
"@angular/platform-browser-dynamic": "~9.1.0",
"@angular/router": "~9.1.0",
"@nativescript/angular": "~9.0.0",
"@nativescript/theme": "~2.3.0",
"nativescript-calendar": "^2.2.1",
"nativescript-ui-calendar": "^7.0.2",
"reflect-metadata": "~0.1.12",
"rxjs": "^6.5.0",
"@nativescript/core": "6.5.8",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular/compiler-cli": "~9.1.0",
"@ngtools/webpack": "~9.1.0",
"nativescript-dev-webpack": "~1.5.0",
"webpack": "4.43.0",
"copy-webpack-plugin": "6.0.3",
"terser-webpack-plugin": "2.2.0",
"typescript": "~3.8.3"
},
"readme": "NativeScript Application"
}

@iamabs2001
Copy link

can you share your code ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants