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

拟墨画扇 提交于 2019-11-26 19:10:26

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/video-editor@4.20.0

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

npm i -s @ionic-native/video-editor@5.0.0-beta.24

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!