upgraded angular 10 to 16, nebular from 6.0.0 to ^9.0.0 facing scss files issue

472 Views Asked by At

using ngx-admin panel with nebular in angular

when angular was 10 everything is fine with nebular/theme 6

i upgraded angular to 16, there are so many issues .changed nebular/theme to ^9.0.0

I am able to compile successfully but CSS or ui is completely discarded.

./src/app/pages/pages.component.scss?ngResource - Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Can't find stylesheet to import.
  ╷
2 │ @import '~@nebular/theme/styles/theming';
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  src\app\@theme\styles\themes.scss 2:9   @import
  src\app\pages\pages.component.scss 1:9  root stylesheet

I can see errors like this for most of scss files. how to solve this?

in few files I changed @import to @use few errors solved.

as angular upgraded do I need to upgrade @nebular/theme also? if so which version?

1

There are 1 best solutions below

0
Pradeep Gunjal On

I have upgraded angular from 12 to 15,i have same error so i change @nebular/theme version to @nebular/[email protected]. Nebular 11 does not support Angular 16, it expects Angular 15 as a dependency. you can use angular 15 + @nebular/[email protected] + angular/[email protected].

its work for me.