Some Material Modules not working after v9 update
See original GitHub issueRegression
I updated my project to version 9 of angular and I updated Angular material as well. Before the update everything was working fine, but after the update, the following Angular Material Modules are not working.
MatBottomSheetModule
MatSnackBarModule
The following are working but tslint shows the modules do not have exported members.
MatChipsModule
MatAutocompleteModule
Here is my customized material module
import { MatButtonModule } from '@angular/material/button';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatChipsModule } from '@angular/material/chips';
import { MatIconModule } from '@angular/material/icon';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
Expected Behavior
All modules should have exported members
Actual Behavior
Module 'node_modules/@angular/material/snack-bar' has no exported member 'MatSnackBarModule'.
Module 'node_modules/@angular/material/chips' has no exported member 'MatChipsModule'.
Module 'node_modules/@angular/material/bottom-sheet"' has no exported member 'MatBottomSheetModule'.
Module 'node_modules/@angular/material/autocomplete' has no exported member 'MatAutocompleteModule'.
Environment
- Angular: 9.0.1
- Node Version: 12.13.1
- CDK/Material: 9.0.0
- Browser: Chrome, Opera, Mozilla
- Operating System: Windows 10, x64
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:6 (2 by maintainers)
Top GitHub Comments
I got the same issue and fixed it.
In my Visual Studio Code, some modules was not found even they was in my
node_modules
.What I did to fix:
node_modules
directory.npm install
Going to close this then, since it seems like it was an environment / node_modules issue.