Angular v8. Compilation fails when importing the module. Error states: 'Please add a @NgModule annotation'
PicchiSeba opened this issue · 2 comments
PicchiSeba commented
Bug Report
- I am running the latest version
- I checked the Readme and found no answer
- I checked to make sure that this issue has not already been filed
- This is related to angular-google-charts and not to Google Charts directly (if it's a Google Charts issue, their forum may help)
Description
When i try to import this module into my project and then try to compile it, I get an error and the compilation fails. The error states that there is an unexpected value in the GoogleChartsModule and that i should add an @NgModule annotation. I am using Angular v8 for this project
To reproduce
Steps to reproduce the behaviour:
- install the package with
npm i angular-google-charts --save
- go to my app module and include GoogleChartsModule in the imports section
- compile with
ng b
- See error
Expected behaviour
Should compile flawlessly
Exception or Error
ERROR in Unexpected value 'GoogleChartsModule in MyApp/node_modules/angular-google-charts/lib/google-charts.module.d.ts' imported by the module 'MyModule in MyApp/src/app/modules/mymodule.ts'. Please add a @NgModule annotation.
Your environment
Angular CLI: 8.3.29
Node: 16.16.0
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router
Package Version
--------------------------------------------------------------------
@angular-devkit/architect 0.803.29
@angular-devkit/build-angular 0.803.29
@angular-devkit/build-optimizer 0.803.29
@angular-devkit/build-webpack 0.803.29
@angular-devkit/core 8.3.29
@angular-devkit/schematics 8.3.29
@angular/cdk 8.2.3
@angular/cli 8.3.29
@angular/http 7.2.16
@angular/localize 9.1.12
@angular/material 8.2.3
@nguniversal/module-map-ngfactory-loader v8.2.6
@schematics/angular 8.3.29
@schematics/update 0.803.29
rxjs 6.6.7
typescript 3.5.3
webpack 4.39.2