Hi all,
I integrater Youtube plugin into my app but at startup I receve this error in console:
Error: Invalid provider for the NgModule 'AppModule' - only instances of Provider and Type are allowed, got: [..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ?[object Object]?, ...]
at throwInvalidProviderError (core.js:5455)
at providerToFactory (core.js:11347)
at providerToRecord (core.js:11318)
at R3Injector.processProvider (core.js:11216)
at core.js:11202
at core.js:1135
at Array.forEach (<anonymous>)
at deepForEach (core.js:1135)
at R3Injector.processInjectorType (core.js:11202)
at core.js:11009
import { YoutubeVideoPlayer } from "@ionic-native/youtube-video-player";
providers: [
...
YoutubeVideoPlayer,
...
],
"@ionic-native/youtube-video-player": "^5.31.1",
ionic cordova plugin add cordova-plugin-youtube-video-player
npm install @ionic-native/youtube-video-player
Ionic:
Ionic CLI : 5.4.4 (C:\Users\xxxxxxx\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 5.5.3
@angular-devkit/build-angular : 0.1000.8
@angular-devkit/schematics : 10.0.8
@angular/cli : 10.0.8
@ionic/angular-toolkit : 2.3.3
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0, browser 6.0.0
Cordova Plugins : not available
Utility:
cordova-res : 0.6.0 (update available: 0.15.2)
native-run : 0.2.8 (update available: 1.2.2)
System:
NodeJS : v10.16.3 (C:\Program Files\nodejs\node.exe)
npm : 6.9.0
OS : Windows 10
I’m testing on Chrome browser
Could you please help me?
Thanks