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.

Unexpected value 'MdPaginatorModule [..] Please add a @NgModule annotation

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

It should build

What is the current behavior?

I get an error:

Error: Unexpected value ‘MdPaginatorModule in /node_modules/@angular/material/typings/index.d.ts’ imported by the module ‘AppModule in /src/app/app.module.ts’. Please add a @NgModule annotation.

What are the steps to reproduce?

import { MdPaginatorModule } from '@angular/material';

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

@angular/cdk”: “^2.0.0-beta.10”, “@angular/common”: “4.1.0”, “@angular/material”: “^2.0.0-beta.10”,

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
maxgarsaizcommented, Dec 5, 2017

Hello @bkcsfi, remove MatTableDataSource and MatTable from the import of @NgModule. Because in the MatTableModule they are already declared. Just import them into your component to use them.

1reaction
maxgarsaizcommented, Nov 25, 2017

@nooballday you have to import MatTableModule from @angular/material to @NgModule.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected value ' ' imported by the module ' '. Please add a ...
Please add a @NgModule annotation. . Now I have no idea where I should add it, because my app.module.ts looks like this: import...
Read more >
Unexpected value 'MdPaginatorModule [..] Please add a ...
I get an error: Error: Unexpected value 'MdPaginatorModule in ... value 'MdPaginatorModule [..] Please add a @NgModule annotation #6826.
Read more >
unexpected value 'chooser' imported by the module ... - You.com
In the browser console i get this error. Unexpected value 'OverlayContainer' imported by the module 'AppModule'. Please add a @NgModule annotation. What are...
Read more >
Angular Noob here - what does "Please add a @NgModule ...
I am trying to build my angular web app using ng build --prod . ... ERROR in : Unexpected value 'NouisliderModule in /<project_home>/node_modules/ ......
Read more >
Angular Error on build: 'Please add a @NgModule annotation'
I'm using Angular 6 with the latest SpreadJS demo. When trying to build to production, I get the following error: ERROR in :...
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