Angular compile error after upgrading kendo-theme-default to 6.1.0

1 Answer 178 Views
Styling
Dariush
Top achievements
Rank 1
Iron
Iron
Iron
Dariush asked on 15 Feb 2023, 04:48 PM

Hi everyone,

I got errors on "ng build" regarding a function in the all.scss after upgrading the upgrading kendo-theme-default to 6.1.0.

the error is:

./src/styles.scss - Error: Module Error (from ./node_modules/postcss-loader/dist/cjs.js):
C:\Perforce\Noorollah.Malek_LINW-DMALEK_QA_Reporting_Dashboards_Dev_856\QAReportingDashboard\QAReportingDashboard\ClientApp\src\styles.scss:26468:3: Can't resolve 'null' in 'C:\Perforce\Noorollah.Malek_LINW-DMALEK_QA_Reporting_Dashboards_Dev_856\QAReportingDashboard\QAReportingDashboard\ClientApp\src'

and is related to @progress/kendo-theme-default/dist/all.scss.

I figured out this is because of below function in the all.scss file which followed by ToDo comment since when I remove it the build goes successfully.


// TODO: Remove this function or rethink the logic
@function k-true-mix( $color1, $color2, $weight: 50% ) {
    @return k-color-mix( rgba( $color1, 1 ), rgba( $color2, 1 ), $weight );
}

if you remove this, still needs to make some other changes in other parts of the file.

Is there any other solution for that or is it fixed currently?

Thanks

1 Answer, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 20 Feb 2023, 09:48 AM

Hi Dariush,

I am not able to reproduce the issue with Angular v15 and Kendo Theme Default v6.1.0.

The only warning that I see when ng build is executed is the one in the attached screenshot, which is discussed in this PR on Github.

If you want us to investigate the issue further, please send us a sample project where we can see the issue and look in to it. Thank you.

Regards,
Ivo
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Dariush
Top achievements
Rank 1
Iron
Iron
Iron
commented on 21 Feb 2023, 10:13 AM

Thanks for your reply. A simple project is attached to this message. 
As I mentioned before currently you get an error and if you remove the function in all.scss the build error gets disappeared.
Thanks
Dariush
Top achievements
Rank 1
Iron
Iron
Iron
commented on 21 Feb 2023, 01:34 PM

Please consider that the style.scss has been changed  and apparently the issue is because of using all.scss in this file.
Dariush
Top achievements
Rank 1
Iron
Iron
Iron
commented on 21 Feb 2023, 01:39 PM

@import "@progress/kendo-theme-default/dist/all.scss"
Ivo
Telerik team
commented on 22 Feb 2023, 01:39 PM

Hi Dariush,

Thank you for the sample project.

It seems to be a strange issue that is only reproducible when the theme is imported inside a CSS class, for example:

.dark {
    @import "@progress/kendo-theme-default/dist/all.scss";
}

It even gets more strange because the issue seems to be resolved by simply re-saving the all.scss file.

Could you please confirm if the issue is resolved by simply opening the all.scss file (node_modules\@progress\kendo-theme-default\dist) and re-saving it, without deleting anything?

Dariush
Top achievements
Rank 1
Iron
Iron
Iron
commented on 22 Feb 2023, 04:32 PM

Thanks for your message.
I just tried that and yes, it works. Opened it and saved it without any changes and the project was built. I guess it's may be some encoding issue or something like that.
Dariush
Top achievements
Rank 1
Iron
Iron
Iron
commented on 28 Feb 2023, 02:40 PM

Hi Ivo,

Do you have any update about that?

Ivo
Telerik team
commented on 02 Mar 2023, 03:42 PM

Hi Dariush,

Thank you for the update.

Yes, it does seem to be an encoding issue. We will investigate it further in order to figure out what is causing it and will fix it in a future release.

Let us know in case additional information is needed.

Tags
Styling
Asked by
Dariush
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Ivo
Telerik team
Share this question
or