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.

'mat-select' is not a known element

See original GitHub issue

Bug, feature request, or proposal:

bug

What is the expected behavior?

No error

What is the current behavior?

I upgraded from angular 4 to 6 After that when running project I get error:

'mat-select' is not a known element:
1. If 'mat-select' is an Angular component, then verify that it is part of this module.
2. If 'mat-select' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("-form-field>
<mat-form-field>
	[ERROR ->]<mat-select formControlName="provinceFormControl" placeholder="Provincia" name="country_shipping"

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

Angular CLI: 6.0.7 Node: 8.11.2 OS: win32 x64 Angular: 6.0.3 … animations, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, platform-server, router

Package Version

@angular-devkit/architect 0.6.7 @angular-devkit/build-angular 0.6.7 @angular-devkit/build-optimizer 0.6.7 @angular-devkit/core 0.6.7 @angular-devkit/schematics 0.6.7 @angular/cdk 6.2.0 @angular/cli 6.0.7 @angular/material 6.2.0 @ngtools/webpack 6.0.7 @schematics/angular 0.6.7 @schematics/update 0.6.7 rxjs 6.2.0 typescript 2.7.2 webpack 4.10.2

Is there anything else we should know?

I moved every <mat-select> inside a <mat-form-field> and addedd import for MatFormFieldModule in app.module

Issue Analytics

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

github_iconTop GitHub Comments

20reactions
crisbetocommented, Jun 3, 2018

You also have to import the MatSelectModule.

3reactions
ekhanna26commented, Dec 18, 2018

@ORESoftware In app.module.ts file - @NgModule({ declarations: [ AppComponent ], imports: [ MatSelectModule ]

Read more comments on GitHub >

github_iconTop Results From Across the Web

'mat-select' is not a known element when making build in ...
All components are working fine in development mode but when I make build for production it shows error that 'mat-select' is not a...
Read more >
mat- is not a known element - devioblog
Console Error Message Import Module Module Location mat‑autocomplete is not a known element MatAutocompleteModule autocomplete MatBadgeModule badge MatButtonModule button
Read more >
Select | Angular Material
<mat-select> is a form control for selecting a value from a set of options, similar to the native <select> element. You can read...
Read more >
'mat-select' is not a known element when making ... - iTecNote
'mat-select' is not a known element when making build in angular 5 · Best Solution · Related Solutions ...
Read more >
ngx-mat-select-search - npm
Angular component providing an input field for searching / filtering MatSelect options of the Angular Material library.
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