question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

I am using angular2-highcharts with Ionic 2 RC.0. But I am getting the following error:

[12:52:35]  ngc error: Error: Unexpected value 'ChartModule' imported by the module 'AppModule'
    at node_modules/@angular/compiler/bundles/compiler.umd.js:14113:37
    at Array.forEach (native)
    at CompileMetadataResolver.getNgModuleMetadata (node_modules/@angular/compiler/bundles/compiler.umd.js:14096:46)
    at node_modules/@angular/compiler/bundles/compiler.umd.js:12937:58
    at Array.forEach (native)
    at OfflineCompiler.analyzeModules (node_modules/@angular/compiler/bundles/compiler.umd.js:12936:21)
    at CodeGenerator.codegen (node_modules/@angular/compiler-cli/src/codegen.js:105:47)

I am using it like this:

// app.module.js
import { ChartModule } from 'angular2-highcharts';

@NgModule({
  imports: [
    ...
    ChartModule, 
    ...
  ],
  ...
})
export class AppModule { }

Error happens when I do npm run build. Any ideas?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

3reactions
Fankcommented, Sep 29, 2016

@Sukh9212 yea it does PR is on the way

0reactions
singhjusrajcommented, Sep 29, 2016

node_modules

every core angular package has an index.metadata.json file which is utilized by ngc during compilation.

If you reference to this issue https://github.com/angular/angular/issues/11262

They say that these metadata files are auto-generated by ngc. So if you try to compile this library with ngc, I believe the metadata file will be autogenerated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected value 'FusionChartsModule' imported by the ...
I faced the same issue. I deleted the node modules & package-lock.json file and then install angular-fusioncharts: 3.0.4 Do not include ...
Read more >
Unexpected value 'undefined' imported by the module ...
Coding example for the question Unexpected value 'undefined' imported by the module 'AppModule' at syntaxError-angular.js.
Read more >
Unexpected value 'undefined' imported by the module ...
And getting: Unexpected value 'undefined' imported by the module 'AppModule' My app.module.ts: import { BrowserModule } from ...
Read more >
Chart can not be compiled with AOT - Prime Community Forum
ERROR in : Unexpected value 'ChartModule in ../hb/node_modules/primeng/chart.js' imported by the module 'AppModule in .
Read more >
Karma unit testing error: Unexpected value imported by the ...
Please add a @NgModule annotation. angularelectronkarma-jasmineng-modulesunit-testing. I ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found