Skip to content
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

Capacitor v4.7 Importing WebPlugin #13

Open
Sebastian-Elstadt opened this issue Mar 7, 2023 · 2 comments
Open

Capacitor v4.7 Importing WebPlugin #13

Sebastian-Elstadt opened this issue Mar 7, 2023 · 2 comments

Comments

@Sebastian-Elstadt
Copy link

My project is running Ionic v6.1.9 with Angular v15.2.0 and Capacitor v4.7.0.

In my service I am trying to import the UdpPlugin like:
import { UdpPlugin } from 'capacitor-udp';

But this UdpPlugin class is of type UdpPluginWeb. Which does not have the create methods. If I go to definition, it takes me to the web.d.ts file in the capacitor-udp/dist/esm/ folder in node_modules and I see the UdpPlugin class gets export as:

declare const UdpPlugin: UdpPluginWeb;
export { UdpPlugin };

Plugins and PluginRegistery from @capacitor/core is now deprecated so I can't follow the fixes specified in this plugin's readme file. For Capacitor v4 you must import the plugins directly. What can I do to fix this?

@gee1k
Copy link

gee1k commented Mar 17, 2023

Hi, I'm having the same problem, do you have a solution?

@Sebastian-Elstadt
Copy link
Author

Hi, I'm having the same problem, do you have a solution?

No, I abandoned the plugin and opted for a TCP approach using WebSockets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants