NathanWalker / nativescript-ngx-fonticon

Use custom font icon collections seamlessly with NativeScript + Angular.
MIT License
76 stars 39 forks source link

Error: Type TNSFontIconModule does not have 'ngModuleDef' property. #67

Open detonimarco opened 4 years ago

detonimarco commented 4 years ago

Hi, I upgreded to "nativescript-ngx-fonticon": "^6.0.3" from "nativescript-ngx-fonticon": "^5.0.2",

"nativescript-ngx-fonticon": "^6.0.3", "@angular/core": "~8.2.0", "nativescript-angular": "^8.21.0", "tns-core-modules": "^6.5.0, "tns-android": { "version": "6.5.0" }

getting

System.err: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function 
System.err: Error: Type TNSFontIconModule does not have 'ngModuleDef' property.
System.err: File: (file: node_modules/@angular/core/fesm5/core.js:1524:0)
System.err: 
System.err: StackTrace: 
System.err: ZoneAwareError(file: node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js:1298:0)
System.err:     at getNgModuleDef(file: node_modules/@angular/core/fesm5/core.js:1524:0)
System.err:     at (file: node_modules/@angular/core/fesm5/core.js:1355:0)
System.err:     at noSideEffects(file: node_modules/@angular/core/fesm5/core.js:1163:0)
System.err:     at ɵɵsetNgModuleScope(file: node_modules/@angular/core/fesm5/core.js:1354:0)
System.err:     at (file: node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js:26:14)
System.err:     at ../node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js(file: node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js:28:50)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:753:0)
System.err:     at fn(file: src/webpack/bootstrap:120:0)
System.err:     at ../node_modules/nativescript-ngx-fonticon/index.js(file: node_modules/nativescript-ngx-fonticon/index.js:9:34)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:753:0)
System.err:     at fn(file: src/webpack/bootstrap:120:0)
System.err:     at ./app/app.module.ts(file:///data/data/org.nativescript.ngsample/files/app/bundle.js:1052:84)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:753:0)
System.err:     at fn(file: src/webpack/bootstrap:120:0)
System.err:     at (file:///data/data/org.nativescript.ngsample/files/app/bundle.js:2952:73)
System.err:     at ./main.ts(file:///data/data/org.nativescript.ngsample/files/app/bundle.js:3016:30)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:753: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.ngsample/files/app/bundle.js:2:57)
System.err:     at require(:1:266)
System.err: 
System.err: 
System.err: Error: Type TNSFontIconModule does not have 'ngModuleDef' property.
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: Error: Type TNSFontIconModule does not have 'ngModuleDef' property.
System.err: File: (file: node_modules/@angular/core/fesm5/core.js:1524:0)
System.err: 
System.err: StackTrace: 
System.err: ZoneAwareError(file: node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js:1298:0)
System.err:     at getNgModuleDef(file: node_modules/@angular/core/fesm5/core.js:1524:0)
System.err:     at (file: node_modules/@angular/core/fesm5/core.js:1355:0)
System.err:     at noSideEffects(file: node_modules/@angular/core/fesm5/core.js:1163:0)
System.err:     at ɵɵsetNgModuleScope(file: node_modules/@angular/core/fesm5/core.js:1354:0)
System.err:     at (file: node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js:26:14)
System.err:     at ../node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js(file: node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js:28:50)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:753:0)
System.err:     at fn(file: src/webpack/bootstrap:120:0)
System.err:     at ../node_modules/nativescript-ngx-fonticon/index.js(file: node_modules/nativescript-ngx-fonticon/index.js:9:34)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:753:0)
System.err:     at fn(file: src/webpack/bootstrap:120:0)
System.err:     at ./app/app.module.ts(file:///data/data/org.nativescript.ngsample/files/app/bundle.js:1052:84)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:753:0)
System.err:     at fn(file: src/webpack/bootstrap:120:0)
System.err:     at (file:///data/data/org.nativescript.ngsample/files/app/bundle.js:2952:73)
System.err:     at ./main.ts(file:///data/data/org.nativescript.ngsample/files/app/bundle.js:3016:30)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:753: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.ngsample/files/app/bundle.js:2:57)
System.err:     at require(:1:266)
System.err: 
System.err: 
System.err: Error: Type TNSFontIconModule does not have 'ngModuleDef' property.
System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6065)
System.err:     at android.app.ActivityThread.-wrap1(Unknown Source:0)
System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
System.err:     at android.os.Handler.dispatchMessage(Handler.java:105)
System.err:     at android.os.Looper.loop(Looper.java:164)
System.err:     at android.app.ActivityThread.main(ActivityThread.java:6944)
System.err:     at java.lang.reflect.Method.invoke(Native Method)
System.err:     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
System.err: Caused by: com.tns.NativeScriptException: Error calling module function 
System.err: Error: Type TNSFontIconModule does not have 'ngModuleDef' property.
System.err: File: (file: node_modules/@angular/core/fesm5/core.js:1524:0)
System.err: 
System.err: StackTrace: 
System.err: ZoneAwareError(file: node_modules/@nativescript/angular/zone-js/dist/zone-nativescript.js:1298:0)
System.err:     at getNgModuleDef(file: node_modules/@angular/core/fesm5/core.js:1524:0)
System.err:     at (file: node_modules/@angular/core/fesm5/core.js:1355:0)
System.err:     at noSideEffects(file: node_modules/@angular/core/fesm5/core.js:1163:0)
System.err:     at ɵɵsetNgModuleScope(file: node_modules/@angular/core/fesm5/core.js:1354:0)
System.err:     at (file: node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js:26:14)
System.err:     at ../node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js(file: node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js:28:50)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:753:0)
System.err:     at fn(file: src/webpack/bootstrap:120:0)
System.err:     at ../node_modules/nativescript-ngx-fonticon/index.js(file: node_modules/nativescript-ngx-fonticon/index.js:9:34)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:753:0)
System.err:     at fn(file: src/webpack/bootstrap:120:0)
System.err:     at ./app/app.module.ts(file:///data/data/org.nativescript.ngsample/files/app/bundle.js:1052:84)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:753:0)
System.err:     at fn(file: src/webpack/bootstrap:120:0)
System.err:     at (file:///data/data/org.nativescript.ngsample/files/app/bundle.js:2952:73)
System.err:     at ./main.ts(file:///data/data/org.nativescript.ngsample/files/app/bundle.js:3016:30)
System.err:     at __webpack_require__(file: src/webpack/bootstrap:753: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.ngsample/files/app/bundle.js:2:57)
System.err:     at require(:1:266)
System.err: 
System.err: 
System.err: Error: Type TNSFontIconModule does not have 'ngModuleDef' property.
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:1125)
System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6062)
System.err:     ... 8 more

If I stay on "nativescript-ngx-fonticon": "^5.0.2" it runs without errors

Regards MDT

andreifloroiu commented 4 years ago

Same error here!

s0l4r commented 4 years ago

Same error here:

JavaScript error: file:///node_modules/@angular/core/fesm5/core.js:1524:0: JS ERROR Error: Type TNSFontIconModule does not have 'ngModuleDef' property. (CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Error: Type TNSFontIconModule does not have 'ngModuleDef' property. at getNgModuleDef(file:///node_modules/@angular/core/fesm5/core.js:1524:0) at file:///node_modules/@angular/core/fesm5/core.js:1355:0 at noSideEffects(file:///node_modules/@angular/core/fesm5/core.js:1163:0) at file:///node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js:26:14 at ../node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js(file:///node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js:28:50) at __webpack_require__(file:///src/webpack/bootstrap:750:0) at fn(file:///src/webpack/bootstrap:120:0) at ../node_modules/nativescript-ngx-fonticon/index.js(file:///node_modules/nativescript-ngx-fonticon/index.js:9:42) at __webpack_require__(file:///src/webpack/bootstrap:750:0) at fn(file:///src/webpack/bootstrap:120:0) at ./app/app.module.ts(file:///src/app/app.module.ts:1:0) at __webpack_require__(file:///src/webpack/bootstrap:750:0) at fn(file:///src/webpack/bootstrap:120:0) at file:///app/bundle.js:462:92 at ./main.ts(file:///app/bundle.js:534:34) at __webpack_require__(file:///src/webpack/bootstrap:750:0) at checkDeferredModules(file:///app/runt<…> NativeScript caught signal 6.

oOBlinkOo commented 4 years ago

same error!

leo00723 commented 4 years ago

avaScript error: file: node_modules/@angular/core/fesm5/core.js:1524:0: JS ERROR Error: Type TNSFontIconModule does not have 'ngModuleDef' property. (CoreFoundation) ** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Error: Type TNSFontIconModule does not have 'ngModuleDef' property. at getNgModuleDef(file: node_modules/@angular/core/fesm5/core.js:1524:0) at file: node_modules/@angular/core/fesm5/core.js:1355:0 at noSideEffects(file: node_modules/@angular/core/fesm5/core.js:1163:0) at file: node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js:26:14 at ../node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js(file: node_modules/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js:28:50) at webpack_require(file: src/webpack/bootstrap:750:0) at fn(file: src/webpack/bootstrap:120:0) at ../node_modules/nativescript-ngx-fonticon/index.js(file: node_modules/nativescript-ngx-fonticon/index.js:9:42) at webpack_require(file: src/webpack/bootstrap:750:0) at fn(file: src/webpack/bootstrap:120:0) at ./app/app.module.ts(file: src/app/app.module.ts:1:0) at webpack_require(file: src/webpack/bootstrap:750:0) at fn(file: src/webpack/bootstrap:120:0) at file:///app/bundle.js:3637:92 at ./main.ts(file:///app/bundle.js:3688:34) at webpack_require(file: src/webpack/bootstrap:750:0) at checkDeferredModules(file:///app/r<…> NativeScript caught signal 6. Native Stack: 1 0x109962481 sig_handler(int) 2 0x7fff5245a5fd _sigtramp 3 0x1 4 0x7fff5234ba5c abort 5 0x7fff502497f8 cxa_bad_cast 6 0x7fff502499c7 demangling_unexpected_handler() 7 0x7fff513fbd7c _objc_terminate() 8 0x7fff50256e97 std::terminate(void ()()) 9 0x7fff502568fe __cxa_get_exception_ptr 10 0x7fff502568c5 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception) 11 0x7fff513fbc44 _objc_exception_destructor(void) 12 0x1099150fd NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState, JSC::Exception, bool) 13 0x109963824 -[TNSRuntime executeModule:referredBy:] 14 0x1079c7813 main 15 0x7fff5227ec25 start 16 0x1 JS Stack: Successfully synced application com.polaticks on device 145D9AAC-973D-49E2-BC6E-6ABBD2631A34. Child process terminated with signal 15: Terminated

laverix commented 4 years ago

Type TNSFontIconModule does not have 'ngModuleDef' property.

mm-spiio commented 4 years ago

Any news on this? this aint working....

leo00723 commented 4 years ago

if you use icomoon you can create your own font-pack that comes with hex codes that you can use directly in the html

On Wed, May 6, 2020 at 10:15 AM Manuel Maestrini notifications@github.com wrote:

Any news on this? this aint working....

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NathanWalker/nativescript-ngx-fonticon/issues/67#issuecomment-624506550, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALJP5WWZZ3G4IXJBACDQXADRQEMBVANCNFSM4LQ4ZMJA .

mm-spiio commented 4 years ago

@leo00723 sure ok, but that does not have anything to do with the fact that this package isn't working with recent angular versions (i guess it's the issue).

DeRaNGeR commented 4 years ago

is there any solution?

7ganam commented 4 years ago

same error

davidpodhola commented 4 years ago

Following steps in https://github.com/NativeScript/nativescript-angular/pull/2124 helped me.

Bezlepkin commented 3 years ago

Following steps in NativeScript/nativescript-angular#2124 helped me.

a lot of text :)

Bezlepkin commented 3 years ago

did you manage to solve the problem?

davidpodhola commented 3 years ago

@Bezlepkin yes