Components: Using stepper throws an exception "ERROR TypeError: _this._driver.validateStyleProperty is not a function"

Created on 21 Jun 2018  路  21Comments  路  Source: angular/components

Bug, feature request, or proposal:

I am using angular 6, I installd the material and I am trying to use the stepper component, like ths:
<mat-horizontal-stepper> <mat-step label="step1">step1</mat-step> <mat-step label="step2">step2</mat-step> </mat-horizontal-stepper>
the app.module imports is like this:
imports: [ BrowserModule, BrowserAnimationsModule, RouterModule.forRoot(appRoutes) , FormsModule, HttpClientModule , FormWizardModule , ArchwizardModule, MatStepperModule ],
but I got the following exception:
NewReqComponent.html:16 ERROR TypeError: _this._driver.validateStyleProperty is not a function at browser.js:844 at Array.forEach (<anonymous>) at browser.js:843 at Array.forEach (<anonymous>) at AnimationAstBuilderVisitor.push../node_modules/@angular/animations/fesm5/browser.js.AnimationAstBuilderVisitor._validateStyleAst (browser.js:840) at AnimationAstBuilderVisitor.push../node_modules/@angular/animations/fesm5/browser.js.AnimationAstBuilderVisitor.visitStyle (browser.js:780) at AnimationAstBuilderVisitor.push../node_modules/@angular/animations/fesm5/browser.js.AnimationAstBuilderVisitor.visitState (browser.js:678) at browser.js:657 at Array.forEach (<anonymous>) at browser.js:655

I tried to debug the issue, I found there is a mismatch between the functions parameters:
image
the bodyNode contains the driver value and the _driver contains the normlizer and the normlizer is empty
image

Most helpful comment

After upgrading Angular to 6.0.6 the problem seems to be fixed

All 21 comments

I have the same issue with mat-sidenav-container component.

Same here with map-paginator

same issue with header

same for mat-form-field

same here for mat-form-field. Any fix so far

temp fix:
go to packages.json -> dependencies
"@angular/animations": "6.0.5",
npm install

temp fix:
go to packages.json -> dependencies
"@angular/animations": "6.0.5",
npm install

I tried that but it does not work with me.
Any one have it work?

After upgrading Angular to 6.0.6 the problem seems to be fixed

how can i update to Angular 6.0.6 i used the ng update command but it is not working ?

I don't know if there is a more secure or official way to do this, what I did is :

  • Replace the version of each @angular/ dependency in packages.json by 6.0.6 (previously 6.0.3 in my case)
  • [Optional] remove node_modules/folder
  • npm install

I have the same issue with mat-sidenav-container component

Same issue

-Replace the version of each @angular/ dependency in packages.json by 6.0.6 (previously 6.0.3 in my case)
-[Optional] remove node_modules/folder
-npm install

This did not work for me. Any fix yet?

You can also try updating via npm update.

temp fix:
go to packages.json -> dependencies
"@angular/animations": "6.0.5",
npm install

work for me! thank you!

I have updated angular version with material. solution provided by @GuillaumeMilani fixed issue for me

I used below commands

$ ng update @angular/cli
$ ng update @angular/core
$ ng update @angular/material

upgrading angular solve the issue.
Thanks to @GuillaumeMilani

As noted above, it appears that the @angular/animations package needs to be updated for your project.

I just wanted to say that I finally got a PDF of 1000 pages from the Angular reference. I do not want to criticize your job. I just wanted to say it.

Just let your material version as same as your angular version.

@josephperrott Sorry to resurrect, but any chance this has come back in "@angular/animations": "6.0.7" + "@angular/material": "6.3.2"? Here's a stackblitz: https://stackblitz.com/edit/angular-zqmhyo
... or I can open a new issue you if you prefer?

... works correctly if I revert @angular/animations to "6.0.5"... still broken in "6.0.6" as well.

I'm still facing this problem
"dependencies": { "@angular/animations": "^6.0.0", "@angular/cdk": "^6.0.0", "@angular/material": "^6.0.0", "hammerjs": "^2.0.8" }
When I downgrade animations to version 6.0.5 it works. But I don't think that a downgrade is a proper solution. Are there any other solutions for this?

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shlomiassaf picture shlomiassaf  路  3Comments

savaryt picture savaryt  路  3Comments

crutchcorn picture crutchcorn  路  3Comments

MurhafSousli picture MurhafSousli  路  3Comments

RoxKilly picture RoxKilly  路  3Comments