-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ndef not exported by NFC plugin #713
Comments
Yeah that's because we're using We would have to do something else like here: b95f88c#diff-a740ceecb06436e4f3c45e162549de31R111 |
Will try converting it to a proper class with empty functions. Should I do the same for Nfc while I'm at it or is it fine as is? |
It seems like that Ndef class is mapping to this NPM library: https://www.npmjs.com/package/ndef |
No the Ndef class comes with the NFC plugin. It is the only thing that needs to be modified. It needs to be converted to a regular class instead of Just like what I did there with the mixpanel plugin |
The Ndef class is not exported the nfc.ts plugin. It has an annotation for private and is not included in the index.ts file. However, the examples in both the ionic docs and code comments suggest importing it alongside NFC.
I get the following error when I run Ionic Serve:
bundle failed: 'Ndef' is not exported by node_modules/ionic-native/dist/esm/plugins/nfc.js (imported by node_modules/ionic-native/dist/esm/index.js). For help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
I would like to create a PR to fix this and a few other things related to Ndef, however I am struggling to get the build to reflect the exported class. I have removed the private annotation, added Ndef to the imports in
index.ts
and also added it to thewindow['IonicNative']
object. When I runnpm run build
everything runs fine but there is no export for Ndef in eitheres5/plugins/nfc.js
oresm/plugins/nfc.js
.Would appreciate some guidance in getting this built so I can test it and create the PR.
The text was updated successfully, but these errors were encountered: