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

Types defs from npm cache conflict with Deno types #24671

Closed
jollytoad opened this issue Jul 22, 2024 · 2 comments
Closed

Types defs from npm cache conflict with Deno types #24671

jollytoad opened this issue Jul 22, 2024 · 2 comments
Labels
duplicate a duplicate of another issue

Comments

@jollytoad
Copy link
Contributor

jollytoad commented Jul 22, 2024

Version: Deno 1.45.2

I've starting seeing errors from TS checking that says the ReadableStream.from property does not exist.

This is a complete error:

TS2339 [ERROR]: Property 'from' does not exist on type '{ new (underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number | undefined; } | undefined): ReadableStream<Uint8Array>; new <R = any>(underlyingSource: UnderlyingDefaultSource<...>, strategy?: QueuingStrategy<...> | undefined): ReadableStream<...>; new <R = any>(underlyingSource?: UnderlyingSourc...'.
  const body = ReadableStream.from(streamEvents())
                              ~~~~
    at file:///Users/mgibson/deno/jollytoad/app/routes/sse/feed.tsx:7:31

Code for this module is here: https://github.com/jollytoad/home/blob/main/app/routes/sse/feed.tsx#L7

Although I'm seeing many of these, here is the full log from my CI action: https://github.com/jollytoad/home/actions/runs/10041643107/job/27750190854#step:6:827

I also see the errors in VSCode too:

Screenshot 2024-07-22 at 2 28 11 PM

It seems that the types from the npm cache are being leaked implicitly:

Screenshot 2024-07-22 at 2 29 36 PM

@dsherret
Copy link
Member

Looks like a duplicate of #24578

@dsherret dsherret added the duplicate a duplicate of another issue label Jul 22, 2024
@dsherret dsherret closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2024
@jollytoad
Copy link
Contributor Author

I can confirm this is now fixed in Deno 1.45.3

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

No branches or pull requests

2 participants