AoT compilation fails
See original GitHub issueCode that works fine with JIT fails with AOT. The only error that I get with AOT is
Error: Unexpected value ‘nvD3’ imported by the module ‘StatisticsModule’
The code
import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {nvD3} from 'ng2-nvd3'
import {SharedModule} from '../../shared/sharedModule';
import {StatsChartComponent} from './charts';
const statsRoutes: Routes = [
//...
];
@NgModule({
imports: [
nvD3,
SharedModule,
RouterModule.forChild(statsRoutes)
],
declarations: [
StatsChartComponent
]
})
export class StatisticsModule {}
based on problems other packages are having, my guess is that a metadata.json file is needed, though I don’t know what goes in it.
“If we want the library to be AoT compatible, it should be pre compiled and the metadata files published on npm”
Issue Analytics
- State:
- Created 7 years ago
- Comments:10
Top Results From Across the Web
Aot compilation fail when publishing for iOS #8286 - GitHub
Description I'm trying to publish a maui app on a windows pc by pairing it with a Mac, with the command dotnet publish...
Read more >Angular AOT compilation failed - typescript - Stack Overflow
The compiler will fail if you have Typescript errors (even if you forgot to type a variable, for example public myVar; will throw...
Read more >Diagnosing a JIT or AOT problem - IBM
By determining whether the JIT or AOT compiler is faulty and, if so, where it is faulty, you can provide valuable help to...
Read more >Ahead-of-time (AOT) compilation - Angular
The Angular ahead-of-time (AOT) compiler converts your Angular HTML and TypeScript code into efficient JavaScript code during the build phase before the ...
Read more >Angular: Writing AoT-friendly applications | by David - Medium
This causes AoT compilation to fail and has two possible solutions. First, change the method implementation in the class to accept a paramter...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@martinmanzo I have enabled Issues
@daominhsangvn Could you enable Issues in your repo?
How do I manage a click event on a chart?