Error when creating Angular 2 custom theme: Argument `$map` of `map-get($map, $key)` must be a map

ⅰ亾dé卋堺 提交于 2019-12-13 04:42:24

问题


I am trying to create my own custom themes in Angular 2 but I keep getting an error.

I have tried installing and reinstalling webpack and rebuilding some other modules but nothing has helped.

ERROR in ./src/app/themes.scss
Module build failed (from ./node_modules/sass-loader/lib/loader.js):

undefined
              ^
      Argument `$map` of `map-get($map, $key)` must be a map
      in C:\Users\Administrator\Dev\MONEY-SAVING\node_modules\@angular\material\_theming.scss (line 1372, column 16)

I am hoping to successfully create my own Angular theme.


回答1:


Have you tried updating your angular material / animations / cdk to be at least roughly the same version? (check in package.json) That helped for me, see my bug

If this is not the issue, a colleague talked about having fixed a similar sass-loader problem recently, there should be Node or Node Package Manager bugs pointing to this.



来源:https://stackoverflow.com/questions/57072544/error-when-creating-angular-2-custom-theme-argument-map-of-map-getmap-k

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!