I have an ionic 3 app that needs access to the device’s serial number.
The Device plugin is already installed in the plugins folder, so I just had to do
npm install --save @ionic-native/device
I then imported it into app.module.ts and declared it in the @ngModule provider array as well.
But doing an ionic serve
or build android
gives me the following error:
Module ‘“…/node_modules/@ionic-native/core/index”’ has no exported member ‘IonicNativePlugin’.
How do I go about solving this?
2 Likes
i have also encounter this as i use media capture plugin, any solution?
IonicNativePlugin was added in newer version of ionic-native/core, so I had to uninstall this one and install the newest one which is 3.6.1, and now plugin got exported and everything works fine.
http://stackoverflow.com/questions/43650747/module-has-no-exported-member-ionicnativeplugin-ionic2
5 Likes
yes i saw the updates, hehe
i run ionic outdated then ionic update
4 Likes
Thanks Codelives- this saved me a lot of time. I just did a
npm uninstall -–save @ionic-native/core
npm install –-save @ionic-native/core@latest
and it works on all platforms now
12 Likes
This doesn’t work in desktop on chrome ?
Hi guys. I’ve been stuck with this for quite some time. I followed the instructions but it just did not work, then I read another related article where a person mentioned to close terminal/cmd and re-open after it was run. I tried this and it worked. Just a missing step that might help someone.