how to integrate power bi with angular, error : Cannot find module 'powerbi-client-angular' or its corresponding type declarations

huangapple go评论67阅读模式
英文:

how to integrate power bi with angular, error : Cannot find module 'powerbi-client-angular' or its corresponding type declarations

问题

错误出现在以下位置:import { PowerBIEmbedModule } from "powerbi-client-angular";
错误信息:找不到模块 'powerbi-client-angular' 或其相应的类型声明。

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NgxPowerBiModule } from 'ngx-powerbi';
import * as pbi from 'powerbi-client';
import { PowerBIEmbedModule } from "powerbi-client-angular";
@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, AppRoutingModule, NgxPowerBiModule, NgxPowerBiModule],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

我有以下文档来在我的应用程序中应用 Power BI,但出现错误。

我已经尝试运行:

npm install ngrx-powerbi

npm install powerbi-client

npm install --save powerbi-client

npm i angular-powerbi-report

我对 Power BI 不太了解,而且我也是 Angular 的新手。

英文:

Error occuring at : import { PowerBIEmbedModule } from "powerbi-client-angular";
error : Cannot find module 'powerbi-client-angular' or its corresponding type declarations

`import { NgModule } from '@angular/core';import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';import { AppComponent } from './app.component';import { NgxPowerBiModule} from 'ngx-powerbi';import * as pbi from 'powerbi-client';import { PowerBIEmbedModule } from "powerbi-client-angular";
@NgModule({declarations: [AppComponent],imports: [BrowserModule,AppRoutingModule,NgxPowerBiModule,NgxPowerBiModule,
],providers: [],bootstrap: [AppComponent]})export class AppModule { }`

I have following document to apply power bi in my app, but it is giving me error.

I have tried to run :

> >npm install ngrx-powerbi
>
> \>npm install powerbi-client
>
> \>npm install --save powerbi-client
>
> \>npm i angular-powerbi-report

I don't know much about power bi, and i am also new to angular

答案1

得分: 0

尝试使用以下命令安装powerbi-client-angular-npm库:

npm i powerbi-client-angular

您可以参考powerbi-client-angular-github包的演示。

英文:

Try this command to install powerbi-client-angular-npm library

npm i powerbi-client-angular

You can refer to demo of the powerbi-client-angular-github wrapper.

huangapple
  • 本文由 发表于 2023年2月24日 15:03:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/75553475.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定