-
Notifications
You must be signed in to change notification settings - Fork 147
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
Ionic 2 error, "Cannot find module dgram" #31
Comments
I don't think this is Ionic related. I'm getting the same error with a simple NodeJS project. |
I'm getting the same error on ionic 2 typescript with [email protected] using
|
Found an alternative here at ZeroConf Ionic Plugin, I would have preferred this "bonjour" module but I see no other alternative to go to Zeroconf. |
The module dgram is not available in client side Ionic code. Ionic runs on cordova and not on the node js system which means that this package cannot be used in Ionic for the moment. The Zeroconf Ionic plugin is a great alternative, though it is only suited for ios and android. When programming with the zeroconf plugin, you can use safari to debug when you run on an ios device. Find the 'developer' menu in settings and you can see your device listed there. When you can't run on a device but in a browser, look up 'mock' to 'imitate' a service being added so you can develop the things you need. |
Hi, I went into the dgram folder and it is pretty empty (just a readme) :
So as suggested I wrote to npm, and they answered :
And so I went to the web site suggested but it doesn't seems it was empty actually.... Whatever, I tried to comment out things with dgram ( in multicast-dns package ) or tweek it but it seems it was useful at some points. SO, so, i don't know what to do with that haha. I'll go to multicast-dns see what may be done. |
In an Ionic 2 TypeScript project, I've installed the bonjour npm module, then imported it like this:
import bonjour from 'bonjour';
That doesn't throw errors. Bt as soon as I refer to bonjour, I get the runtime error
Cannot find module "dgram"
Has anyone successfully used this plugin with Ionic 2?
The text was updated successfully, but these errors were encountered: