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.