microsoft / powerbi-client-angular

Power BI Angular component. This library lets you embed Power BI report, dashboard, dashboard tile, report visual, or Q&A in your Angular application.
Other
134 stars 65 forks source link

Only works in Angular versions 12+ #7

Closed o-k-a-y closed 2 years ago

o-k-a-y commented 3 years ago

Please add some documentation to point this out or fail the install if Angular version 12+ is not present.

Requires at least @angular/core and @angular/common version 12 therefore an Angular upgrade to 12 or higher is needed. Install will still succeed with a lower Angular version, but build/serve will fail.

Warnings during install

npm WARN powerbi-client-angular@1.0.1 requires a peer of @angular/common@^12.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN powerbi-client-angular@1.0.1 requires a peer of @angular/core@^12.0.1 but none is installed. You must install peer dependencies yourself.

Snippet from powerbi-client-angular.js which is included in the npm install of powerbi-client-angular:

import * as i0 from '@angular/core';
...
PowerBIEmbedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PowerBIEmbedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
PowerBIEmbedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: PowerBIEmbedComponent, selector: "powerbi-embed", inputs: { cssClassName: "cssClassName", service: "service" }, ngImport: i0, template: '', isInline: true });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PowerBIEmbedComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'powerbi-embed',
                    template: '',
                }]
        }], propDecorators: { cssClassName: [{
                type: Input
            }], service: [{
                type: Input
            }] } });

You will get a list of errors including:

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 94:10-28
"export 'ɵɵFactoryTarget' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 245:10-28
"export 'ɵɵFactoryTarget' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 422:10-28
"export 'ɵɵFactoryTarget' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 595:10-28
"export 'ɵɵFactoryTarget' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 750:10-28
"export 'ɵɵFactoryTarget' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 919:10-28
"export 'ɵɵFactoryTarget' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 1092:10-28
"export 'ɵɵFactoryTarget' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 1165:10-28
"export 'ɵɵFactoryTarget' (imported as 'i0') was not found in '@angular/core'

mError: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 108:0-27
"export 'ɵɵngDeclareClassMetadata' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 282:0-27
"export 'ɵɵngDeclareClassMetadata' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 458:0-27
"export 'ɵɵngDeclareClassMetadata' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 631:0-27
"export 'ɵɵngDeclareClassMetadata' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 785:0-27
"export 'ɵɵngDeclareClassMetadata' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 955:0-27
"export 'ɵɵngDeclareClassMetadata' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 1128:0-27
"export 'ɵɵngDeclareClassMetadata' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 1182:0-27
"export 'ɵɵngDeclareClassMetadata' (imported as 'i0') was not found in '@angular/core'

[91mError: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 88:29-50
"export 'ɵɵngDeclareFactory' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 239:35-56
"export 'ɵɵngDeclareFactory' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 416:38-59
"export 'ɵɵngDeclareFactory' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 589:33-54
"export 'ɵɵngDeclareFactory' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 744:44-65
"export 'ɵɵngDeclareFactory' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 913:35-56
"export 'ɵɵngDeclareFactory' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 1086:32-53
"export 'ɵɵngDeclareFactory' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 1159:26-47
"export 'ɵɵngDeclareFactory' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 1175:26-48
"export 'ɵɵngDeclareInjector' (imported as 'i0') was not found in '@angular/core'

Error: ./node_modules/powerbi-client-angular/fesm2015/powerbi-client-angular.js 1167:26-48
"export 'ɵɵngDeclareNgModule' (imported as 'i0') was not found in '@angular/core'
eddyizm commented 3 years ago

This is very disappointing when I thought I found a simple solution. My company is still on @angular/core 8.* and they probably won't go for an update for this one library.

may-hartov commented 2 years ago

We have released a new version of powerbi-client-angular to support Angular 11 Applications, please use version >= 2.0.0