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 SampleModule' imported by the module 'AppModule' on Generate Build With Angular 5

See original GitHub issue

I 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.


"@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:open
  • Created 6 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

xSTLIFExcommented, Nov 14, 2017

@lamstutz Thanks! I had problem with ngc, everything work great now.

tagkillercommented, Dec 19, 2017

@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 !

Read more comments on GitHub >

github_iconTop 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 >

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 Post

No results found

github_iconTop Related Hashnode Post

No results found