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

Getting DOMError while doing ng serve in angular #86

Open
pawanjaiswal182 opened this issue Jul 29, 2023 · 8 comments
Open

Getting DOMError while doing ng serve in angular #86

pawanjaiswal182 opened this issue Jul 29, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@pawanjaiswal182
Copy link

Describe the bug

Getting DOMError while doing ng serve in angular.

Error: node_modules/@twilio/rtc-diagnostics/es5/lib/errors/DiagnosticError.d.ts:10:15 - error TS2304: Cannot find name 'DOMError'.

10 domError: DOMError | DOMException | undefined;
~~~~~~~~
Error: node_modules/@twilio/rtc-diagnostics/es5/lib/errors/DiagnosticError.d.ts:27:28 - error TS2304: Cannot find name 'DOMError'.

27 constructor(domError?: DOMError | DOMException, message?: string);

× Failed to compile.

To Reproduce
Install the @twilio/rtc-diagnostics and then do ng serve in angular.

Expected behavior
It should build the project without any error.

Environment

  • OS: Windows 11 Pro
  • Browser: chrome Version 115.0.5790.110 (Official Build) (64-bit)
  • Node.js version: v18.16.0
  • [email protected]
    "@twilio/rtc-diagnostics": "^1.0.1",
@pawanjaiswal182 pawanjaiswal182 added the bug Something isn't working label Jul 29, 2023
@uk8566
Copy link

uk8566 commented Jul 29, 2023

Even I have noticed the same error , We need to replcae the DomError to DomException. Because the DOMError is depcrecated now.

Please remove and update the files wherever the Error type is declared as DOMError.

This is causing the build issue in our local. Please do the needful.

@charliesantos
Copy link
Contributor

@pawanjaiswal182 @uk8566 Thanks for submitting. Are you seeing this on other frameworks outside of Angular?

@fgarciachipi
Copy link

fgarciachipi commented Oct 6, 2023

@charliesantos I'm having the same error in a react app. It looks like the interface DOMError was removed starting with typescript 4.4

microsoft/TypeScript-DOM-lib-generator#1029 (comment)

@AravindJo-kore
Copy link

@pawanjaiswal182 any resolution ?

@Lokis2009
Copy link

Hi @charliesantos !
Are there any updates on this issue?
It takes an hour to fix this in lib, I just don't have permission to create a branch ((
Maybe someone from your side can take care of this? Because we are blocked from update higher than Angular 12 with this issue :(

@umair-optevus
Copy link

We can achieve this by declaring type DOMError in your angular repo

@charliesantos
Copy link
Contributor

Thanks for the ping everyone and apologies for the late response. I submitted an internal ticket to fix this but it's currently low in priority due to other higher priority items. Please use the workaround @umair-optevus provided for now. Thank you.

@AravindJo-kore
Copy link

We can achieve this by declaring type DOMError in your angular repo

created new file with src/typings/dom-error.d.ts
interface DOMError extends Error {
name:string;
message: string;
}
and included in typeRoots but not luck

and i don't want to use skipLibCheck: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants