Build failing with "can't resolve all parameters for MediaObject"


#1

Installed @ionic-native/media, but I’m getting an error when trying to build with --prod tag.

Full error message:

Can't resolve all parameters for MediaObject in node_modules/@ionic-native/media/index.d.ts

Ionic info output:

Your system information:

Cordova CLI: 6.3.1
Ionic Framework Version: 3.0.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.7.0
Xcode version: Not installed


#2

I’m having exact problem. Have you come up with solution yet?


#3

My installation of the plugin was somehow corrupted; remove it and install it again and, if that doesn’t fix it, check the json files in the plugins folder and manually remove the media plugin from there.


#4

I tried removing/reinstalling many times but can’t seem to work.
the error message seemed to come up when i add mediaobject to providers in app.module.ts.
Do I need to add both MediaPlugin and MediaObject to app.module.ts providers?


#5

Actually, you only need to add MediaPlugin there.


#6

thx @arfons only adding MediaPlugin to the providers fixed the issue


#7

@mikethetechy @arfons
Hi,
I wonder if how this plugin is working for you guys. I tried to record but it doesn’t seem to work.