Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PowerBIEmbedModule
✓ import { PowerBIEmbedModule } from 'powerbi-client-angular';
Must be imported in the Angular module (NgModule) where embedding components are used.
PowerBIReportEmbedComponent
✓ import { PowerBIReportEmbedComponent } from 'powerbi-client-angular';
✗ import { PowerBIReportEmbedComponent } from 'powerbi-client-angular/powerbi-report-embed.component';
Component is re-exported from the module; direct import from subpath is not supported.
PowerBIEmbed
✓ import { PowerBIEmbed } from 'powerbi-client-angular';
✗ import PowerBIEmbed from 'powerbi-client-angular';
PowerBIEmbed is a named export (decorator), not a default export. Used for custom components with @PowerBIEmbed().
models
✓ import { models } from 'powerbi-client-angular';
✗ import { models } from 'powerbi-client';
models is re-exported from powerbi-client for convenience, but importing directly from powerbi-client also works.
Imports PowerBIEmbedModule, defines a component with powerbi-report selector, configures embed properties and event handlers.
// app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { PowerBIEmbedModule } from 'powerbi-client-angular';
import { AppComponent } from './app.component';
@NgModule({
imports: [
BrowserModule,
PowerBIEmbedModule
],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule { }
// app.component.ts
import { Component } from '@angular/core';
import { models } from 'powerbi-client-angular';
@Component({
selector: 'app-root',
template: `
<powerbi-report
[embedConfig]="{
type: 'report',
id: 'reportId',
embedUrl: 'https://app.powerbi.com/reportEmbed?reportId=reportId',
accessToken: accessToken,
tokenType: models.TokenType.Embed
}"
[cssClassName]="'report-class'"
[eventHandlers]="eventHandlers"
></powerbi-report>
`
})
export class AppComponent {
accessToken = 'YOUR_ACCESS_TOKEN';
eventHandlers = new Map<string, (event?: any) => void>([
['loaded', () => console.log('Report loaded')],
['rendered', () => console.log('Report rendered')],
['error', (event) => console.log(event.detail)]
]);
}
Errors
Common errors & fixes
Error: Cannot find module 'powerbi-client-angular'
Package not installed or incorrect import path.
fixRun 'npm install powerbi-client-angular powerbi-client' and ensure import path is 'powerbi-client-angular'.
TypeError: Cannot read properties of undefined (reading 'Embed')
models not imported correctly or accessToken missing.
fixImport models from 'powerbi-client-angular' and ensure embedConfig includes a valid accessToken.
NG8001: 'powerbi-report' is not a known element
PowerBIEmbedModule not imported in the module that declares the component.
fixAdd PowerBIEmbedModule to the imports array of the NgModule.
Audit
Dependencies
powerbi-clientrequiredCore library for Power BI embedding functionality
powerbi-report-authoringoptionalOptional dependency for report authoring features (changing visual types, etc.)
rxjsrequiredPeer dependency for Angular reactive programming