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

Angular - Module not found: Error: Can't resolve 'dgram' in '..\node_modules\dgram-as-promised\lib' #38

Closed
mohit26chauhan opened this issue Mar 19, 2020 · 0 comments

Comments

@mohit26chauhan
Copy link

mohit26chauhan commented Mar 19, 2020

I'm using this lib in Angular project, import code is as below:
import { DgramAsPromised, SocketAsPromised } from 'dgram-as-promised';

Creating object like this:
let socket: SocketAsPromised = DgramAsPromised.createSocket('udp4')

In package.json file:
"dependencies": {
...
"dgram-as-promised": "^3.0.3",
...
}
"devDependencies": {
...
"@types/node": "^12.11.1",
...
}

When I compile my project, It give me below error:
ERROR in node_modules/dgram-as-promised/lib/socket-as-promised.d.ts:2:8 - error TS1192: Module '"dgram"' has no default export.

Could you please suggest what would be the possible solution for this issue?

@dex4er dex4er closed this as completed in 4758b44 Oct 16, 2020
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

1 participant