Ionic v4 Uncaught TypeError: Object(...) is not a function

All I had to do was: In dependencies, instead of "@ionic-native/media-capture": "^4.12.0" I wrote "@ionic-native/media-capture": "^5.0.0-beta.14". After that I typed npm update in CLI. And in my page component I used import { MediaCapture, MediaFile, CaptureError, CaptureImageOptions } from '@ionic-native/media-capture/ngx';. The important part here is /ngx as described in this link. Well I had to do this for AndroidPermissions, Diagnostic, Media and File. After that issue was solved. Hope it will help others.