Getting “Uncaught (in promise): TypeError: Object(…) is not a function” Error from Ionic-native VideoEditor Plugin

It seems ionic team has made some changes to their native plugins. You need to install the correct version of the native plugin corresponding to your project type. And import it correctly based on your angular version. All you need to do is,

Check your project type in ionic.config.json file.

If the type is “ionic-angular“, then install 4.x.x version. In your case

npm i -s @ionic-native/[email protected]

If the type is “angular“, then install 5.x.x-beta version

npm i -s @ionic-native/[email protected]

Note:

Add ngx at the end of import only if you are using Angular 6

import { VideoEditor } from '@ionic-native/video-editor/ngx';

if not remove ngx from the import both in app.module.ts and app.component.ts

import { VideoEditor } from '@ionic-native/video-editor';

Refencence:https://github.com/ionic-team/ionic/issues/15225#issuecomment-414074074

Leave a Comment