NativeScript/angular

Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function System.err: Error: Angular JIT compilation failed: '@angular/compiler' not loaded!

kfathy-ys opened this issue · 1 comments

Nativescript 8.0.2
Node 12.18.3
Angular 12.2.0

when tns run android it return the following error
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: Error: Angular JIT compilation failed: '@angular/compiler' not loaded!
System.err: - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.
System.err: - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?
System.err: - Alternatively provide the compiler with 'import "@angular/compiler";' before bootstrap

Are you using schemas: [NO_ERRORS_SCHEMA]? I got this when declaring a standalone component without including that line in the Component declaration.