Error SampleModule' imported by the module 'AppModule' on Generate Build With Angular 5
See original GitHub issueI updated the packages from this lib to the new version of Angular 5, but consuming the library in an application generates the following error.
Unexpected value 'SampleModule' imported by the module 'AppModule'. Please add a @NgModule annotation.
package.json
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/compiler-cli": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@compodoc/compodoc": "^1.0.0-beta.10",
"@types/jest": "^19.2.3",
"@types/node": "~6.0.60",
"angular-in-memory-web-api": "^0.3.2",
"codelyzer": "~2.0.0",
"concurrently": "^3.4.0",
"core-js": "^2.4.1",
"del": "^2.2.2",
"gulp": "^3.9.1",
"gulp-rename": "^1.2.2",
"gulp-rollup": "^2.11.0",
"jest": "^20.0.3",
"jest-preset-angular": "^2.0.2",
"lite-server": "^2.3.0",
"node-sass": "^4.5.2",
"node-sass-tilde-importer": "^1.0.0",
"node-watch": "^0.5.2",
"protractor": "~5.1.0",
"rollup": "^0.49.3",
"run-sequence": "^1.2.2",
"rxjs": "^5.1.0",
"systemjs": "^0.20.12",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "^2.5.2",
"zone.js": "^0.8.4"
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Angular CLI - new application with separate angular library
Uncaught Error: Unexpected value '[object Object]' imported by the module 'AppModule'. Please add a @NgModule annotation. Changing the imports ...
Read more >Introduction to modules - Angular
They can import functionality that is exported from other NgModules, and export selected functionality for use by other NgModules. Every Angular application has ......
Read more >NgModules - Angular
The Angular CLI generates the following basic AppModule when creating a new application. src/app/app.module.ts (default AppModule) content_copy // imports ...
Read more >Feature modules - Angular
In the CLI generated feature module, there are two JavaScript import ... To import it into the AppModule , add it to the...
Read more >Frequently-used modules - Angular
For example, in the basic application generated by the Angular CLI, BrowserModule is the first import at the top of the AppModule ,...
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 FreeTop 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
Top GitHub Comments
@lamstutz Thanks! I had problem with ngc, everything work great now.
@mu250234 , unfortunately I can’t help you on this one as I’m not really involved in your project and doesn’t have the biggest picture. Sorry !