Skip to content
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

Doesn't seem to work with AoT compiler - Please add .metadata.json file in next release #36

Closed
naveedahmed1 opened this issue Sep 2, 2016 · 8 comments

Comments

@naveedahmed1
Copy link

When I try to compile my project using ngc for Ahead of Time Compilation. The compiler throws the below error:

Error: Unexpected value 'CKEditorModule' imported by the module 'AppModule'

@yabab-dev
Copy link
Owner

I don't plan to work on this until the final release of Angular 2. But if someone is interested to work on that, pull requests are welcome.

Can you share some code/config ?

Thanks !

@belprixx
Copy link

belprixx commented Sep 2, 2016

@naveedahmed1

did u put CKEditorModule in the imports and providers of your NgModule ?

@naveedahmed1
Copy link
Author

naveedahmed1 commented Sep 2, 2016

@chymz I have a normal component (HomeComponent) with CKEditor and my AppModule looks like this:

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgModule } from '@angular/core';

import { AppComponent } from './components/app.component';
import { HomeComponent } from './components/home/home.component';
import { CKEditorModule } from 'ng2-ckeditor';

@NgModule({
    imports: [
        BrowserModule,
        FormsModule,
        ReactiveFormsModule,
        CKEditorModule
    ],
    declarations: [
        AppComponent,
        HomeComponent
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }

Your might find below comments useful:

angular/angular#11262 (comment)

angular/angular#11262 (comment)

angular/angular#11262 (comment)

Complete conversation (angular/angular#11262)

Actually the Angular team suggest that library vendors should also ship .metadata.json files. These files are produced automatically by ngc.

@naveedahmed1 naveedahmed1 changed the title Doesnt seem to work with AoT compiler Doesn't seem to work with AoT compiler - Please add .metadata.json file with next release Sep 2, 2016
@naveedahmed1 naveedahmed1 changed the title Doesn't seem to work with AoT compiler - Please add .metadata.json file with next release Doesn't seem to work with AoT compiler - Please add .metadata.json file in next release Sep 2, 2016
@yabab-dev
Copy link
Owner

@naveedahmed1 thanks for this, i'll look when I have a moment !

@devCrossNet
Copy link

+1

@yabab-dev
Copy link
Owner

@naveedahmed1 fixed in v1.1.x, feel free to reopen if needed ;)

@devCrossNet
Copy link

@chymz sorry, it was an open issue and I installed it last week. didn't check for updates.

@yabab-dev
Copy link
Owner

yabab-dev commented Oct 16, 2016

@devCrossNet : no problem for that, just stop to add comment with only +1, github have now reaction button 😄

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

No branches or pull requests

4 participants