-
Notifications
You must be signed in to change notification settings - Fork 217
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
Error: node_modules/twilio-video/tsdef/VideoProcessor.d.ts:2:34 - error TS2304: Cannot find name 'OffscreenCanvas'. #1629
Comments
@jrayga thanks for the report. This seems to be happening on your Angular 13 setup correct? Can you please provide a simple Angular 13 project where I can run the build commands that shows this error? And as workaround for now, can you please try installing
|
@charliesantos even I'm getting the same problem in Angular-v13 and installing |
for now excluding the file in tsconfig.app.json would do the work like: "exclude": ["node_modules/twilio-video/tsdef/VideoProcessor.d.ts"] |
@ankitkaushik24 do you have a simple Angular 13 project where I can reproduce this? |
It was removed from the auto generated They are going to try and decouple the dom definitions from the typescript version in 4.5 so the can be versioned independently. You can probably duplicate the problem by just targeting typescript 4.4 it's not specific to Angular. I was able to fix it with a slightly more targeted method since I don't use OffscreenCanvas directly. // Temp fix for OffscreenCanvaswas removed from lib.dom.d.ts in Typescript 4.4
// https://github.com/twilio/twilio-video.js/issues/1629
// https://github.com/microsoft/TypeScript/issues/45745#issuecomment-916440817
declare type OffscreenCanvas = any; |
I'm having the same problem and none of the above recommendations work for me. |
Thanks everyone for the information. I added an internal ticket to investigate further. |
Any word on this? This is a big show stopper. Will use @nsmithdev work around for now, but not ideal. |
We are currently working on other higher priority items. Please bear with us. |
@nsmithdev and @jrayga I found a slightly cleaner workaround too. So like @charliesantos suggested. You install
|
Hi...
|
I have to use Twilio video chat and currently working on Angular 13+ and getting--- Cannot find name 'OffscreenCanvas'. 3 inputFrameBuffer: OffscreenCanvas | HTMLCanvasElement | HTMLVideoElement, this error can u please suggest me what to do next??? |
@jrayga , @tarendra1128 , @DaniTwilio , @sir-captainmorgan21 , @ghulamb , @nsmithdev , Sorry for the late response. Apart from the workaround mentioned by @charliesantos , you can also upgrade to any version of Angular with TypeScript version in the range 4.9.3 - 4.9.5. This will also fix the type error. |
or sensitive account information (API keys, credentials, etc.) when reporting this issue.
Code to reproduce the issue:
Expected behavior:
Complete the ng build process
Actual behavior:
Build failing because of the error.
Software versions:
The text was updated successfully, but these errors were encountered: