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

ReadableStream on AWS and node 18 #23

Open
pbrink231 opened this issue Oct 31, 2023 · 0 comments
Open

ReadableStream on AWS and node 18 #23

pbrink231 opened this issue Oct 31, 2023 · 0 comments

Comments

@pbrink231
Copy link
Owner

pbrink231 commented Oct 31, 2023

Looks like there is a bug where ReadableStream is required in the 'dom' lib by AWS. Other services like Heroku use AWS as the backing.

error TS2304: Cannot find name 'ReadableStream'.

In order to fix this the best thing I found when deploying to that enviroment is to add a global type definition that your tsconfig can see.

In node-types.d.ts (or some other file you choose that is seen by typescript

// due to AWS and ReadableStream being in dom and not node bug
// this is a work around
declare global {
  type ReadableStream = unknown
}

export { };

Hopefully there is a better workout in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant