akveo / nebular

:boom: Customizable Angular UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/nebular
MIT License
8.05k stars 1.51k forks source link

Saa Error - Strict-unary error #3140

Open a-adeleye opened 1 year ago

a-adeleye commented 1 year ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch @nebular/theme@9.1.0-rc.8 for the project I'm working on.

Warning: Deprecation This operation is parsed as:

"Nebular Theme: `nb-theme()` cannot find value for key `" + $key + "` for theme `" + theming-variables.$nb-theme-name + ""

but you may have intended it to mean:

"Nebular Theme: `nb-theme()` cannot find value for key `" + $key + "` for theme `" + theming-variables.$nb-theme-name (+"")

Add a space after + to clarify that it's meant to be a binary operation, or wrap it in parentheses to make it a unary operation. This will be an error in future versions of Sass.

Here is the diff that solved my problem:

diff --git a/node_modules/@nebular/theme/styles/core/theming/_get-value.scss b/node_modules/@nebular/theme/styles/core/theming/_get-value.scss
index 8dae59d..581c8e9 100644
--- a/node_modules/@nebular/theme/styles/core/theming/_get-value.scss
+++ b/node_modules/@nebular/theme/styles/core/theming/_get-value.scss
@@ -59,7 +59,7 @@
   }

   @if ($value == null) {
-    @warn 'Nebular Theme: `nb-theme()` cannot find value for key `' + $key + '` for theme `'+ theming-variables.$nb-theme-name +'`';
+    @warn 'Nebular Theme: `nb-theme()` cannot find value for key `' + $key + '` for theme `'+ theming-variables.$nb-theme-name (+'`');
   }

   @return $value;

This issue body was partially generated by patch-package.

andreaslarssen commented 1 year ago

@a-adeleye Did you figure out this one? I posted #3173 that seems similar?

a-adeleye commented 1 year ago

Yes. I used patch package to fix it. See here https://github.com/ds300/patch-package