nebular icon indicating copy to clipboard operation
nebular copied to clipboard

Saa Error - Strict-unary error

Open a-adeleye opened this issue 2 years ago • 2 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @nebular/[email protected] 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.

a-adeleye avatar Nov 28 '22 06:11 a-adeleye

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

andreaslarssen avatar Apr 27 '23 08:04 andreaslarssen

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

a-adeleye avatar May 10 '23 13:05 a-adeleye