创建 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.
推荐答案
您是否尝试过将 angular material/animations/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屋!