Ionic native (csZBar) problem whit Ionic v4

I have developed an application with ionic v3 with which I use the zbar plugin, but when I migrate to ionic v4 the application stops working, it is not able to compile it or run it with ionic serve. If I uninstall the plugin the application works perfectly, but I lose the functionality of reading the barcodes. Has anyone had the same problem with this plugin? Do you have any solution?
Thank you.

I attach the errors returned:

Console error:

index.js:80 Uncaught TypeError: Object(…) is not a function
at index.js:80
at Object…/node_modules/@ionic-native/zbar/index.js (index.js:128)
at webpack_require (bootstrap:81)
at Object…/src/app/app.module.ts (app.component.ts:12)
at webpack_require (bootstrap:81)
at Object…/src/main.ts (environment.ts:15)
at webpack_require (bootstrap:81)
at Object.0 (main.ts:12)
at webpack_require (bootstrap:81)
at checkDeferredModules (bootstrap:43)

ZBar.decorators = [ { type: Injectable }, ]; __decorate([ Cordova(), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise) ], ZBar.prototype, "scan", null);

Thanks @reedrichards, it has been very useful for me.

1 Like