krokwebpackerror: сборка модуля не удалась (из ./ node_modules /sass-loader /dist /cjs.js):
не определенная переменная.
╷
117 │ @error 'Тема для #{map.get ($ map,' name ') } не содержит #{$ key} ';
│ ^^^^^
╵
node_modules \igniteui-theming\sass\themes_functions.scs 117: 41 var-get ()
node_modules@infragistics \igniteui-angular\lib\corelyles \ Componentents \Bottom-nav_bottom-nav-theme.scss 125: 16 Bottom-nav ()
node_modules@infragistics \ igniteui-angular \ lib \ core \ styles \ themes \ generators_base.scss 155: 9 Theme-internal ()
node_modules@infragistics \Igniteui-angular\lib\core\styles \Temes\generators_Base.scss 42: 5 Тема ()
node_modules. @infragistics \ igniteui-angular \ lib \ core \ styles \ themes \ generators_base.scss 667: 5 Light-Theme ()
src\styles \rhi-light-theme.scss 6: 3 @import
src \ styles.scss 23: 9 root stylesheet
my styles.scss установлен, как ниже:
// rhi styles < Br />
Код: Выделить всё
@import './styles/rhi';
// igx-color function has been renamed to color which is the same as the bootstrap function. Declare all infragistics colours before importing bootstrap.
// Bootstrap
@import "node_modules/bootstrap/scss/bootstrap";
// IMPORTANT: Make sure you always include igx-core first!
@include core();
// Configure application fonts with igx-typography
@include typography(
$font-family: "'Montserrat', sans-serif",
$type-scale: $rhi-type-scale
);
// Initialise ignite ui themes
@include theme($rhi-color-palette);
//Import rhi themes
@import './styles/rhi-light-theme';
@import './styles/rhi-dark-theme';
< /code>
Проблема, по-видимому, конкретно связана с: < /p>
$ rhi-color-palette < /p>
в RHI. SCSS у меня есть: < /p>
// Import the IgniteUI themes library first
@use '@infragistics/igniteui-angular/theming' as *;
@forward '@infragistics/igniteui-angular/theming';
// CSS Reset, comment out if not required or using a different module
@import 'node_modules/minireset.css/minireset';
// Import our defined palettes and schemas
@import './igx-palettes';
@import './igx-type-scales.scss';
.....
< /code>
in igx-palettes.scss у нас есть: < /p>
$rhi-color-palette: palette(
$primary: $rhi-blue-color,
$secondary: $rhi-pink-color,
$surface: #fff,
$info: color($light-material-palette, 'info'),
$success: color($light-material-palette, 'success'),
$error: color($light-material-palette, 'error'),
$warn: color($light-material-palette, 'warn'),
);
$rhi-color-palette-dark: palette(
$primary: $rhi-pink-color,
$secondary: $rhi-pink-color,
$gray: $white-color,
$surface: #222,
$info: color($light-material-palette, 'info'),
$success: color($light-material-palette, 'success'),
$error: color($light-material-palette, 'error'),
$warn: color($light-material-palette, 'warn'),
);
< /code>
, а затем в Light-theme.scss есть: < /p>
.rhi-light-theme {
@include light-theme($rhi-color-palette);
< /code>
.....
и в Dark-theme.scss: < /p>
.rhi-dark-theme {
@include dark-theme($rhi-color-palette-dark);
< /code>
.....
Я знаю, что это связано с
$ rhi-color-palette, как будто я удаляю эти строки styles.scss: < /p>
@include theme($rhi-color-palette);
@import './styles/rhi-light-theme';
@import './styles/rhi-dark-theme';
@include light-theme($rhi-color-palette);
@include dark-theme($rhi-color-palette-dark);
< /code>
Тогда я все еще могу включить строки < /p>
@import './styles/rhi-light-theme';
@import './styles/rhi-dark-theme';
< /code>
in stiles.scss и построит. Таким образом, проблема, кажется, связана с тем, как настроена палитра, но я не уверен, что нужно изменить?
Подробнее здесь: https://stackoverflow.com/questions/789 ... ontain-key
Мобильная версия