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

Error importing module #5

Open
silvioq opened this issue Oct 10, 2017 · 2 comments
Open

Error importing module #5

silvioq opened this issue Oct 10, 2017 · 2 comments

Comments

@silvioq
Copy link

silvioq commented Oct 10, 2017

I created a new project and I imported the module ...

After build I get the next error

ERROR in Error: Error encountered resolving symbol values statically. Calling function 'IntlModule', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in /home/silvio/Projects/makon/OetrApp/checkIntl2/src/app/app.module.ts, resolving symbol AppModule in ....

== Code

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpModule} from '@angular/http';
import {IntlModule} from 'ng2-intl';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    HttpModule,
    IntlModule.forRoot(),
    BrowserModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

== version

ng --version
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.4.3
node: 7.10.1
os: linux x64
@angular/animations: 4.4.4
@angular/common: 4.4.4
@angular/compiler: 4.4.4
@angular/core: 4.4.4
@angular/forms: 4.4.4
@angular/http: 4.4.4
@angular/platform-browser: 4.4.4
@angular/platform-browser-dynamic: 4.4.4
@angular/router: 4.4.4
@angular/cli: 1.4.3
@angular/compiler-cli: 4.4.4
@angular/language-service: 4.4.4
typescript: 2.3.4

What I'm made wrong?
Thanks!

@williamsandonz
Copy link

Hi there, I am also getting this error. I've created this stackoverflow question.

@williamsandonz
Copy link

Basically this project needs to be built with Angular compiler so that metadata.json files are produced. Without these, any project that imports this module and compiles with Angular CLI will get this exception when AOT is enabled. I will try and fork and fix but may not have the time.

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

No branches or pull requests

2 participants