I’m trying v4 and got this problem when importing Native Storage.
Just by adding it to the constructor it fails with an error (check below)
Is it possible to use Native Storage in v4?
ERROR Error: Uncaught (in promise): TypeError: Object(...) is not a function
TypeError: Object(...) is not a function
at index.js:133
at Object../node_modules/@ionic-native/native-storage/index.js (index.js:197)
at __webpack_require__ (bootstrap:81)
at Object../src/app/home/home.page.ts (home-home-module.js:307)
at __webpack_require__ (bootstrap:81)
at Object../src/app/home/home.module.ts (home-home-module.js:232)
at __webpack_require__ (bootstrap:81)
at $_lazy_route_resource lazy namespace object:17
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
at Object.onInvoke (core.js:3824)
at index.js:133
at Object../node_modules/@ionic-native/native-storage/index.js (index.js:197)
at __webpack_require__ (bootstrap:81)
at Object../src/app/home/home.page.ts (home-home-module.js:307)
at __webpack_require__ (bootstrap:81)
at Object../src/app/home/home.module.ts (home-home-module.js:232)
at __webpack_require__ (bootstrap:81)
at $_lazy_route_resource lazy namespace object:17
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
at Object.onInvoke (core.js:3824)
at resolvePromise (zone.js:814)
at resolvePromise (zone.js:771)
at zone.js:873
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:3815)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
Thanks @reedrichards. I hate to be that guy who didn’t search the forum first. I took a look and didn’t find anything because I was sure it was a problem with the storage plugin and not all the plugins.
Maybe, if I may, read again the link I linked above. Your problem as nothing to do with cordova itself but how you included ionic-native in your project
I answered this question like a lot of time on the forum, I even linked one of these answers right here in this post, just scroll up and follow “…to the same answer” in my above post