英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论