创建Angular 2自定义主题时出错:map-get($ map,$ key)`的参数$ map必须是一个地图 [英] Error when creating Angular 2 custom theme: Argument `$map` of `map-get($map, $key)` must be a map
问题描述
我正在尝试在Angular 2中创建自己的自定义主题,但我一直遇到错误.
I am trying to create my own custom themes in Angular 2 but I keep getting an error.
我尝试安装和重新安装webpack并重建其他模块,但没有任何帮助.
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)
我希望成功创建自己的Angular主题.
I am hoping to successfully create my own Angular theme.
推荐答案
您是否尝试过将角材料/动画/cdk更新为至少大致相同的版本? (检查package.json)对我有帮助,请参见
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
如果这不是问题,那么一位同事谈到最近已解决了类似的sass-loader问题,那么应该有Node或Node Package Manager错误指向此.
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.
这篇关于创建Angular 2自定义主题时出错:map-get($ map,$ key)`的参数$ map必须是一个地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!