我在尝试导入 IONIC 时遇到此错误

Im geting this error trying to make an import on IONIC

我正在尝试导入 "InAppBrowser" 插件以在 android 应用程序中显示 WordPress 网站。

当我尝试编译代码时出现此错误

[ng] ERROR in src/app/app.module.ts(19,5): error TS2322: Type 'InAppBrowserOriginal' is not assignable to type 'Provider'. [ng]
Type 'InAppBrowserOriginal' is not assignable to type 'ClassProvider'. [ng] Property 'provide' is missing in type 'InAppBrowserOriginal'. [ng] [ng] i 「wdm」: Failed to compile.

这是我 app.module.ts

上的代码
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { InAppBrowser } from '@ionic-native/in-app-browser';

@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule], 
  providers: [
     StatusBar,
     SplashScreen,
     InAppBrowser,
     { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }   
  ],
  bootstrap: [AppComponent] }
)
export class AppModule {}

这是 Ionic 4 项目吗? 如果是这样,正确的导入是

import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';

docs中解释。

请注意,其他导入已经在使用 /ngx 后缀(来自 Ionic 4)。