Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme is not a map. #3235

Open
1 of 2 tasks
convini-kat opened this issue Jan 12, 2024 · 0 comments
Open
1 of 2 tasks

Theme is not a map. #3235

convini-kat opened this issue Jan 12, 2024 · 0 comments

Comments

@convini-kat
Copy link

Issue type

I'm submitting a ... (check one with "x")

  • bug report
  • feature request

Issue description

Current behavior:
After trying to register a custom theme with I get the following error when running ng serve

✘ [ERROR] $map: nb-register-theme ((color-primary-300: #56D1A4), default, default) is not a map.
   
41 │   $theme: map.get(theming-variables.$nb-themes, $name);
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   
  node_modules/@nebular/theme/styles/core/theming/_register.scss 41:11  nb-get-registered-theme()
  node_modules/@nebular/theme/styles/core/theming/_install.scss 126:55  nb-install-global-with-css-props()
  node_modules/@nebular/theme/styles/core/theming/_install.scss 145:5   nb-install()
  src/app/@theme/styles/styles.scss 29:1                                root stylesheet [plugin angular-sass]

Expected behavior:

Variables, defined in nb-register-theme should be applied to the parent theme. ng serve should run without errors.

Steps to reproduce:

Imported nebular theme into my themes.scss and registered a theme, followed by the Docs.

Related code:

themes.scss

@import '@nebular/theme/styles/theming';
@import '@nebular/theme/styles/themes';

$nb-themes: nb-register-theme ( (
        color-primary-300: $brand-color-primary
) , default, default);

styles.scss

@use 'themes' as *;

@use '@nebular/theme/styles/globals' as *;
@import '@nebular/theme/styles/core/mixins';
@import '@nebular/auth/styles/globals';
@import 'bootstrap/scss/bootstrap';
@import 'bootstrap/scss/functions';
@import 'bootstrap/scss/variables';
@import 'bootstrap/scss/mixins';
@import 'bootstrap/scss/grid';
@import './pace.theme';

@include nb-install() {

  // framework global styles
  @include nb-theme-global();
  @include nb-auth-global();

  // loading progress bar
  @include ngx-pace-theme();
}

Other information:

npm, node, OS, Browser

yarn version: 1.22.19
node Version: v18.17.1
macOS Sonoma (14.1)

Angular, Nebular

@angular/cdk@16.2.12
@angular/cli@16.2.11
@angular/animations@16.2.12
@angular/common@16.2.12
@angular/core@16.2.12
@angular/compiler-cli@16.2.12
@angular/compiler@16.2.12
@angular/forms@16.2.12
@angular/language-service@16.2.12
@angular/localize@16.2.12
@angular/platform-browser@16.2.12
@angular/platform-browser-dynamic@16.2.12
@angular/router@16.2.12
nebular-icons@1.1.0
@nebular/theme@12.0.0
@nebular/auth@12.0.0
@nebular/eva-icons@12.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant