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
Cannot find name 'VideoFrame' error #127
Comments
Ah, I forgot about this problem when we landed the additional VideoFrame overload. |
with: "@webgpu/types": "kainino0x/types#cd1df383c20574709c80d18cb31d14f482bb5795", I got more errors when running the project: node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:56:14 - error TS2304: Cannot find name 'AvcBitstreamFormat'. 56 format?: AvcBitstreamFormat | undefined; node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:74:11 - error TS2552: Cannot find name 'EncodedVideoChunkType'. Did you mean 'EncodedVideoChunk'? 74 type: EncodedVideoChunkType; node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:266:13 node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:137:13 - error TS2304: Cannot find name 'AlphaOption'. 137 alpha?: AlphaOption | undefined; node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:140:19 - error TS2304: Cannot find name 'VideoEncoderBitrateMode'. 140 bitrateMode?: VideoEncoderBitrateMode | undefined; node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:147:19 - error TS2304: Cannot find name 'LatencyMode'. 147 latencyMode?: LatencyMode | undefined; node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:173:13 - error TS2304: Cannot find name 'VideoPixelFormat'. 173 format: VideoPixelFormat; node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:185:13 - error TS2304: Cannot find name 'AlphaOption'. 185 alpha?: AlphaOption | undefined; node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:214:21 - error TS2304: Cannot find name 'CodecState'. 214 readonly state: CodecState; node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:231:21 - error TS2304: Cannot find name 'CodecState'. 231 readonly state: CodecState; node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:262:20 - error TS2552: Cannot find name 'EncodedVideoChunkType'. Did you mean 'EncodedVideoChunk'? 262 readonly type: EncodedVideoChunkType; node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:266:13 node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:329:21 - error TS2304: Cannot find name 'CodecState'. 329 readonly state: CodecState; node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:346:21 - error TS2304: Cannot find name 'CodecState'. 346 readonly state: CodecState; node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:368:22 - error TS2304: Cannot find name 'VideoPixelFormat'. 368 readonly format: VideoPixelFormat | null; Found 13 errors in the same file, starting at: node_modules/@types/dom-webcodecs/webcodecs.generated.d.ts:56 |
It appears that It seems you can use this page to determine which version of the package to use for your version of TypeScript: I think you'll have to install that particular package version explicitly. I arbitrarily chose |
Attempting this further, I don't think there's a way this package can express its dependency on I'm adding tests/examples that make sure the types build and work in various typescript versions. |
Please reopen this if the latest release 0.1.34 with the version-appropriate sibling dependency on |
using @webgpu/types 0.1.34 and typescript 4.6.3, I got the error: Found 2 errors in the same file, starting at: node_modules/@webgpu/types/dist/index.d.ts:83 after updating typescript to 5.1.3, the project compiles and runs successfully without any error. |
I have a WebGPU project that runs fine using @webgpu/types version 0.1.31. However, when updating to 0.1.33, I got the following error when running the same project:
node_modules/@webgpu/types/dist/index.d.ts:83:7 - error TS2304: Cannot find name 'VideoFrame'.
83 | VideoFrame
~~~~~~~~~~
node_modules/@webgpu/types/dist/index.d.ts:807:7 - error TS2304: Cannot find name 'VideoFrame'.
807 | VideoFrame;
~~~~~~~~~~
The error seems nothing to do with my code. How to fix it?
The text was updated successfully, but these errors were encountered: