@angular/platform-browser/platform-browser"'没有导出成员“HammerLoader" [英] @angular/platform-browser/platform-browser"' has no exported member 'HammerLoader'
问题描述
我尝试运行ng build",但出现以下错误.
I tried to run "ng build", I'm getting following error.
"node_modules/@angular/material/core/typings/common-behaviors/common-module.d.ts(9,10)中的错误:错误TS2305:模块'"../Frontend/node_modules/@angular/platform-browser/platform-browser"' 没有导出成员 'HammerLoader'."
"ERROR in node_modules/@angular/material/core/typings/common-behaviors/common-module.d.ts(9,10): error TS2305: Module '"../Frontend/node_modules/@angular/platform-browser/platform-browser"' has no exported member 'HammerLoader'."
pacakge.json 包含@angular/platform-browser"和@angular/material".我试图在这里使用角度材料表.
pacakge.json contain with "@angular/platform-browser" and "@angular/material". I'm trying to use here angular material table.
我无法弄清楚为什么会出现此错误以及可能的解决方案.
I couldn't figure it why this error is coming and the possible solution.
推荐答案
检查@angular/material 版本,新版本仅适用于 angular 7.尝试安装旧版本 (pe npm i @angular/material@6.4.7
).这对我有用.
Check the @angular/material version, the new version only work with angular 7. Try install older version (p.e npm i @angular/material@6.4.7
). This works for me.
这篇关于@angular/platform-browser/platform-browser"'没有导出成员“HammerLoader"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!