0
votes

If I include the following commented code in styles.scss(i.e //@import '~@nebular/auth/styles/all'; and //@include nb-auth-global();) as per the installation process, I get the following error.How to resolve

@import 'themes';    
@import '~@nebular/theme/styles/globals';   
  **//@import '~@nebular/auth/styles/all';**

@include nb-install() {  
  @include nb-theme-global();  
  **//@include nb-auth-global();**  
};  

ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/styles.scss) Module build failed (from ./node_modules/sass-loader/lib/loader.js):

$theme: map-merge(map-get($nb-themes-non-processed, $default), $theme); ^ Argument $map1 of map-merge($map1, $map2) must be a map in /Users/Documents/Nebular-Angular/Angular-Nebular/AngularNebular/node_modules/@nebular/theme/styles/_theming.scss (line 64, column 13)

1
Code looks correct. Could you please provide more details, e.g. Angular and Nebular packages versions, which command fails with this error, modifications you did, etc. Also source of yours themes.scss could help. - yggg

1 Answers

0
votes

@import '~@nebular/auth/styles/all' means import auth styles for all themes (default, cosmic, corporate). If you have only one or portion of themes enabled, then you need to import auth styles only for enabled themes. For example, when only default and corporate themes enabled, auth imports should look like this:

@import '~@nebular/auth/styles/themes/default';
@import '~@nebular/auth/styles/themes/corporate';
@import '~@nebular/auth/styles/globals';

We'll update docs with this note as well, thanks!