Declined
Last Updated: 25 Feb 2021 07:33 by ADMIN
Sylvain
Created on: 18 Feb 2021 08:46
Type: Bug Report
0
angular 11 build

Hi,

Yesterday I upgraded our application to Angular 11 and the builds started failing with a couple of different errors. First of all there was this with Ivy enabled:


Error: ./node_modules/@progress/telerik-angular-report-viewer/dist/dependencies/initExtDeps.js
Module not found: Error: Can't resolve '.\telerikReportViewer.kendo.min' in '/home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies'
resolve '.\telerikReportViewer.kendo.min' in '/home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies'
  using description file: /home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/package.json (relative path: ./dist/dependencies)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: /home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/package.json (relative path: ./dist/dependencies/telerikReportViewer.kendo.min)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies\telerikReportViewer.kendo.min doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies\telerikReportViewer.kendo.min.ts doesn't exist
      .tsx
        Field 'browser' doesn't contain a valid alias configuration
        /home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies\telerikReportViewer.kendo.min.tsx doesn't exist
      .mjs
        Field 'browser' doesn't contain a valid alias configuration
        /home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies\telerikReportViewer.kendo.min.mjs doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies\telerikReportViewer.kendo.min.js doesn't exist

      as directory
        /home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies\telerikReportViewer.kendo.min doesn't exist
[/home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies\telerikReportViewer.kendo.min]
[/home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies\telerikReportViewer.kendo.min.ts]
[/home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies\telerikReportViewer.kendo.min.tsx]
[/home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies\telerikReportViewer.kendo.min.mjs]
[/home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/dependencies\telerikReportViewer.kendo.min.js]
 @ ./node_modules/@progress/telerik-angular-report-viewer/dist/dependencies/initExtDeps.js 9:19-62
 @ ./node_modules/@progress/telerik-angular-report-viewer/dist/es/telerik-report-viewer.component.js
 @ ./node_modules/@progress/telerik-angular-report-viewer/dist/es/main.js
 @ ./libs/handling/ship-dossiers/src/lib/handling-ship-dossiers.module.ts
 @ ./libs/handling/ship-dossiers/src/index.ts
 @ ./apps/aline-portal/src/app/app.routing.ts
 @ ./apps/aline-portal/src/app/app.module.ts
 @ ./apps/adash/src/app/app.module.ts
 @ ./apps/adash/src/main.ts
[91m @ multi ./apps/adash/src/main.ts

Checking the initExtDeps.js file, this error is completely legit since it has a path to file with Windows notation. Our builds run in Linux containers, making this fail, obviously. Changing that file manually makes to requre like so

window.kendo = require('./telerikReportViewer.kendo.min');

makes the build succeed.

When disabling Ivy I'm getting the following error, which I was unable to resolve:

Error: Cannot determine the module for class TelerikReportViewerComponent in /home/sylvain/aline-web/node_modules/@progress/telerik-angular-report-viewer/dist/cjs/telerik-report-viewer.component.d.ts! Add TelerikReportViewerComponent to the NgModule to fix it.
I tried the 3 latest versions of the viewer component, all of them had the same issues.
1 comment
ADMIN
Todor
Posted on: 25 Feb 2021 07:33

Hello Sylvain,

I suggest upgrading the Angular viewer and the corresponding Telerik Reporting REST Service, as the issue with the file path notation is already fixed with the first release of 2021. Here is the original bug report - incorrect path for telerikReportViewer.kendo.min in initExtDeps.js upon install of @progress/telerik-angular-report-viewer package. In the service pack from yesterday, we have fixed also other issues related to Angular viewer - R1 2021 SP1 (15.0.21.224).

The second issue may be related to the one described in the thread Can not determine the module class x Component in location/x.component.ts add xcomponent to Ng Module to fix it. Angular 4 #8062. I suggest testing the fixes described in the thread.

Due to the above, I have declined this bug report.

Regards,
Todor
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/.