JsSIP icon indicating copy to clipboard operation
JsSIP copied to clipboard

Application Build with Angular 18 fails due to typing errors

Open HollerAtMentalis opened this issue 1 year ago • 5 comments

Since upgrading to Angular 18, the following errors occur when building the application:

Bildschirmfoto 2024-09-24 um 15 23 49

These errors seem to occur due to not so clean imports and exports in the d.ts files mentioned in the error messages. It would be great if those could be fixed. Until then I am forced to use the compilerOption "skipLibCheck": true.

HollerAtMentalis avatar Sep 24 '24 13:09 HollerAtMentalis

Have you installed the typescript types as dev dependencies.

AlijiEmmanuel-dev avatar Sep 24 '24 13:09 AlijiEmmanuel-dev

@AlijiEmmanuel-dev Thanks for the quick reply.

Yes I also tried installing the types as dev dependencies. It didn't work. Also the types are marked as deprecated because they should by now be included in the JsSip Lib.

HollerAtMentalis avatar Sep 24 '24 13:09 HollerAtMentalis

I have the same problem. Does anyone have a solution?

viniciusverasdossantos avatar Apr 18 '25 02:04 viniciusverasdossantos

I have the same problem. Does anyone have a solution?

Your missing types is missing browser types related, not JsSip related, possibly if you use angular SSR, thoses types (Socket, MediaConstraints) are not available on NodeJs or more precisely only available in Browser).

Adding type web might works

npm install @types/web --save-dev

Or adding lib "dom" into typescript tsconfig.ts Or adding types by yourself in d.ts

hthetiot avatar Apr 18 '25 08:04 hthetiot

Also the types are marked as deprecated because they should by now be included in the JsSip Lib.

MediaConstraints and Socket are not deprecated and only available in browser build, and are native types.

hthetiot avatar Apr 18 '25 08:04 hthetiot

Closing as it's unrelated to JsSIP.

jmillan avatar Dec 09 '25 10:12 jmillan