-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
JIT compilation failed for NgModule class AppModule #97
Comments
This just happened to me too :| |
Same here. |
me too... |
I've had a similar issue but wasn't caused by NativeScriptLottieModule. I was able to fix it by adding I'm running into another error: This likely means that the library (@nativescript-community/ui-lottie/angular) which declares NativeScriptLottieModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy. I believe the error I'm getting is related to this one. Please let me know if I should create a separate ticket for this. Currently running Angular 12 and Nativescript 8 |
@bouyuc I'm also getting this now using Angular 12 or 14 and Nativescript 8. The exact same message and TS error. |
@brianrclow someone with angular knowledge need to help here. I don't know anything about it or that error :s |
@brianrclow I got lottie to work. I vaguely remember that I followed and modified parts of the tutorial from here: Get creative with app launch animations using Angular 10 with new boot options. Feel free to ping me on discord if you are still having issues. |
For anyone else having this issue. We were able to bypass by using the old setup instructions until this gets sorted out - https://github.com/farfromrefug/nativescript-lottie#component (Currently works for Angular 14 and Nativescript 8) |
I can confirm, using the old setup instructions works for Angular 15 {N} 8. Thank you @mleleux-heykiddo |
I'm also facing this error @nativescript-community/ui-lottie/angular which declares NativeScriptLottieModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. |
I'm able to make it works by registering plugin in the main.ts file. import "@angular/compiler"; import { platformNativeScript, runNativeScriptAngularApp } from '@nativescript/angular'; import Theme from "@nativescript/theme"; runNativeScriptAngularApp({ registerElement('LottieView', () => LottieView); Theme.setMode(Theme.Light); |
@danishashraf047 very nice. I might drop the angular built module and add your example code to the code. Seems much more stable |
@farfromrefug Thanks! :) |
Somehow '@nativescript-community/ui-lottie' didn't work and only 'nativescript-lottie' import worked along with the imports mentioned by @danishashraf047 which is the old way of importing the library. |
@kamilkafoor Are you using NativeScript with Angular? And kindly share package.json of your project because I need to see the version of nativescript and ui-lottie plugin. |
Or it would be good if you share a code that how you are trying to import plugin. |
@danishashraf047 , I am using but now the problem is that it says in iOS and I am not able to resolve it `[!] CocoaPods could not find compatible versions for pod "lottie-ios": Specs satisfying the lottie-ios (from https://github.com/farfromrefug/lottie-ios.git) dependency were found, but they required a higher minimum deployment target. |
Alright, I will setup the project based on your provided package.json later today and back to you with updates. |
@danishashraf047 sure. Thanks. |
@kamilkafoor I would look into increasing the deployment target because of this line of your output. |
Hello,
I need help. NS8 + Angular, if I add the NativeScriptLottieModule in my AppModule I receive this error:
CONSOLE ERROR: JIT compilation failed for NgModule class AppModule {
}
CONSOLE ERROR: bootstrap: Error in Bootstrap Function:
The NgModule 'AppModule' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.
JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.
Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',
or manually provide the compiler with 'import "@angular/compiler";' before bootstrapping.
Error: The NgModule 'AppModule' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.
JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.
Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',
or manually provide the compiler with 'import "@angular/compiler";' before bootstrapping.
at getCompilerFacade (file: src/webpack:/btop/node_modules/@angular/core/fesm2015/core.mjs:4043:0)
Can you help?
Thanks
Marco
The text was updated successfully, but these errors were encountered: