Thi*_*sta 17 angular angular-animations angular6
我为Angular 6应用程序导入NoopAnimationsModule后出现此错误
ERROR TypeError: this.driver.matchesElement is not a function
at TransitionAnimationEngine.push../node_modules/@angular/animations/fesm5/browser.js.TransitionAnimationEngine.processLeaveNode (browser.js:2976)
Run Code Online (Sandbox Code Playgroud)
小智 18
这在几个小时前发生在我身上,可能是由一些过时的模块造成的.
运行npm update --save
修复它.
@angular/core和@ angular/animations应该是相同的版本.
特别是在包名中查找"^"符号package.json
.
它应该是
"@angular/core": "6.0.5",
"@angular/animations": "6.0.5",
Run Code Online (Sandbox Code Playgroud)
而不是喜欢
"@angular/core": "6.0.5",
"@angular/animations": "^6.0.5",
Run Code Online (Sandbox Code Playgroud)