New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular CLI + Angular Material {MatButtonModule} breaks angular build #11100
Comments
The error probably comes from the fact that you have |
How to Solve it? @crisbeto |
Open your package.json file "dependencies": {
"@angular/core": "^5.2.0",
"@angular/cdk": "^6.0.1",
"@angular/material": "^6.0.1"
}, just change these to whatever the current version of the other angular components are. "dependencies": {
"@angular/core": "^5.2.0",
"@angular/cdk": "^5.2.0",
"@angular/material": "^5.2.0"
}, |
yeah! This one works! Thanks @judedaryl |
@SundaramoorthyAnandh no prob man. Another fix to this might be updating your angular-cli to 6.0.0 and updating the rest with |
ok pour 5.2.0 for the moment !!! |
but when we change it to ^5.2.0 , latest version components are not working like Tree component, how to solve? |
@crisbeto any idea about that |
Hi, Now i did with |
"dependencies": { |
As per my previous comment, you can also do it the other way around and update all the angular modules to the same version of material. |
Oh great Thanks ! |
@judedaryl Am trying to use mat-datepicker. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
bug
What is the expected behavior?
proper build
What is the current behavior?
ERROR in node_modules/@angular/material/button-toggle/typings/button-toggle.d.ts(136,20): error TS2315: Type 'ElementRef' is not generic.
node_modules/@angular/material/button-toggle/typings/button-toggle.d.ts(154,104): error TS2315: Type 'ElementRef' is not generic.
node_modules/@angular/material/input/typings/autosize.d.ts(8,37): error TS2307: Cannot find module '@angular/cdk/text-field'.
node_modules/@angular/material/input/typings/input.d.ts(7,33): error TS2307: Cannot find module '@angular/cdk/text-field'.
node_modules/@angular/material/slide-toggle/typings/slide-toggle.d.ts(53,15): error TS2315: Type 'ElementRef' is not generic.
node_modules/@angular/material/slide-toggle/typings/slide-toggle.d.ts(55,18): error TS2315: Type 'ElementRef' is not generic.
node_modules/@angular/material/stepper/typings/stepper.d.ts(25,22): error TS2415: Class 'MatStepper' incorrectly extends base class 'CdkStepper'.
Types of property '_stepHeader' are incompatible.
Type 'QueryList' is not assignable to type 'QueryList'.
Type 'MatStepHeader' is not assignable to type 'ElementRef'.
Property 'nativeElement' is missing in type 'MatStepHeader'.
node_modules/@angular/material/table/typings/cell.d.ts(9,45): error TS2305: Module '"E:/xampp7/htdocs/angular-express-auth/frontend/node_modules/@angular/cdk/table"' has no exported member 'CdkFooterCell'.
node_modules/@angular/material/table/typings/cell.d.ts(9,60): error TS2305: Module '"E:/xampp7/htdocs/angular-express-auth/frontend/node_modules/@angular/cdk/table"' has no exported member 'CdkFooterCellDef'.
node_modules/@angular/material/table/typings/row.d.ts(1,10): error TS2305: Module '"E:/xampp7/htdocs/angular-express-auth/frontend/node_modules/@angular/cdk/table"' has no exported member 'CdkFooterRow'.
node_modules/@angular/material/table/typings/row.d.ts(1,24): error TS2305: Module '"E:/xampp7/htdocs/angular-express-auth/frontend/node_modules/@angular/cdk/table"' has no exported member 'CdkFooterRowDef'.
node_modules/@angular/material/table/typings/table.d.ts(13,22): error TS2415: Class 'MatTable' incorrectly extends base class 'CdkTable'.
Property '_differs' is private in type 'CdkTable' but not in type 'MatTable'.
node_modules/@angular/material/tree/typings/data-source/flat-data-source.d.ts(9,46): error TS2307: Cannot find module '@angular/cdk/tree'.
node_modules/@angular/material/tree/typings/node.d.ts(9,73): error TS2307: Cannot find module '@angular/cdk/tree'.
node_modules/@angular/material/tree/typings/node.d.ts(17,22): error TS2420: Class 'MatTreeNode' incorrectly implements interface 'CanDisable'.
Property 'disabled' is missing in type 'MatTreeNode'.
node_modules/@angular/material/tree/typings/node.d.ts(17,22): error TS2420: Class 'MatTreeNode' incorrectly implements interface 'HasTabIndex'.
Property 'tabIndex' is missing in type 'MatTreeNode'.
node_modules/@angular/material/tree/typings/node.d.ts(32,22): error TS2420: Class 'MatNestedTreeNode' incorrectly implements interface 'CanDisable'.
Property 'disabled' is missing in type 'MatNestedTreeNode'.
node_modules/@angular/material/tree/typings/node.d.ts(32,22): error TS2420: Class 'MatNestedTreeNode' incorrectly implements interface 'HasTabIndex'.
Property 'tabIndex' is missing in type 'MatNestedTreeNode'.
node_modules/@angular/material/tree/typings/outlet.d.ts(8,35): error TS2307: Cannot find module '@angular/cdk/tree'.
node_modules/@angular/material/tree/typings/padding.d.ts(8,36): error TS2307: Cannot find module '@angular/cdk/tree'.
node_modules/@angular/material/tree/typings/toggle.d.ts(1,35): error TS2307: Cannot find module '@angular/cdk/tree'.
node_modules/@angular/material/tree/typings/tree.d.ts(1,25): error TS2307: Cannot find module '@angular/cdk/tree'.
What are the steps to reproduce?
in
app.module
:import {MatButtonModule} from '@angular/material';
What is the use-case or motivation for changing an existing behavior?
?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Is there anything else we should know?
yes.
I see
@angular/material/button/typings/button-module.d.ts
which exportsMatButtonModule
empty.yet
button.d.ts
has all the elements that the error doesn't find.No idea if this helps, just dabbled around there.
The text was updated successfully, but these errors were encountered: