@angular/platform-browser/platform-browser"' h

2020-08-13 01:45发布

I tried to run "ng build", I'm getting following error.

"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 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.

3条回答
甜甜的少女心
2楼-- · 2020-08-13 02:38

This is Just a Version Problem, Try This

npm i @angular/material@6.4.7
查看更多
我欲成王,谁敢阻挡
3楼-- · 2020-08-13 02:44

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.

查看更多
4楼-- · 2020-08-13 02:49

try installing angular material again

ng add @angular/material

angular material - get started

查看更多
登录 后发表回答