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

tsc errors 'error TS2304: Cannot find name' #38

Open
Swimburger opened this issue Mar 8, 2024 · 1 comment
Open

tsc errors 'error TS2304: Cannot find name' #38

Swimburger opened this issue Mar 8, 2024 · 1 comment
Labels
kind/bug Something isn't working triage/needs-investigation Issue needs investigation before it can be confirmed.

Comments

@Swimburger
Copy link
Contributor

Swimburger commented Mar 8, 2024

Running tsc in my app results in the following error.

node_modules/assemblyai/dist/services/realtime/service.d.ts:23:15 - error TS2304: Cannot find name 'WritableStream'.

23     stream(): WritableStream<AudioData>;
                 ~~~~~~~~~~~~~~

node_modules/assemblyai/dist/types/files/index.d.ts:3:47 - error TS2304: Cannot find name 'ReadableStream'.

3 type FileUploadData = NodeJS.ReadableStream | ReadableStream | Blob | BufferSource | ArrayBufferView | ArrayBufferLike | Uint8Array;
                                                ~~~~~~~~~~~~~~

node_modules/assemblyai/dist/types/files/index.d.ts:3:71 - error TS2304: Cannot find name 'BufferSource'.

3 type FileUploadData = NodeJS.ReadableStream | ReadableStream | Blob | BufferSource | ArrayBufferView | ArrayBufferLike | Uint8Array;

A solution in TS is still being discussed:

@Swimburger Swimburger self-assigned this Mar 8, 2024
@Swimburger Swimburger changed the title tsc errors when not including dom lib tsc errors 'error TS2304: Cannot find name' Mar 8, 2024
@Swimburger
Copy link
Contributor Author

I tried fixing this the way AWS SDK does: https://github.com/aws/aws-sdk-js-v3/pull/3889/files
Unfortunately, not all types in the error are interfaces, and the fix only works for interfaces.
For now, I suggest using the DOM lib in TS.

@Swimburger Swimburger added the kind/bug Something isn't working label Mar 18, 2024
@marcusolsson marcusolsson added the triage/needs-investigation Issue needs investigation before it can be confirmed. label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/needs-investigation Issue needs investigation before it can be confirmed.
Projects
None yet
Development

No branches or pull requests

2 participants