Definitelytyped: @types/whatwg-fetch: Cannot find name 'ReadableStream'

Created on 23 Sep 2017  Â·  4Comments  Â·  Source: DefinitelyTyped/DefinitelyTyped

  • [x] I tried using the @types/xxxx package and had problems.
    @types/whatwg-fetch 0.0.33 version has failed with error " node_modules/@types/whatwg-fetch/index.d.ts(32,44): error TS2304: Cannot find name 'ReadableStream'."

I added @types/whatwg-streams to the package.json dev dependencies, but still the failure exists.

  • [x] I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript
    I am on version 2.1.6. Trying now with 2.5.2 which is the latest stable version of tsc. Will update the issue once installation and verification is done.

Got new set of errors on tsc 2.5.2

node_modules/@types/react/index.d.ts(165,11): error TS2559: Type 'Component' has no properties in common with type 'ComponentLifecycle'.
node_modules/@types/whatwg-fetch/index.d.ts(11,13): error TS2451: Cannot redeclare block-scoped variable 'fetch'.
node_modules/@types/whatwg-fetch/index.d.ts(13,14): error TS2300: Duplicate identifier 'HeadersInit'.

FYI, a lot of my react-native project also errored out with tsc 2.5.2. It would be great if you could resolve the the issue for tsc 2.1.6

  • [x] I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).
    Yes
  • [x] [Mention](https://github.com/blog/821-mention-somebody-they-re-notified) the authors (see Definitions by: in index.d.ts) so they can respond.

    • Authors: @ryan-codingintrigue

Most helpful comment

Whatwg-fetch is built into typescript now . So no changes to code

Sent from my iPhone

On Sep 29, 2017, at 9:31 AM, Pavel notifications@github.com wrote:

@shrutic what did you use instead of ?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

All 4 comments

@loghorn this started after 3cc32b8e73320a5e9e4a17744236180f52c753d9

I solved it by upgrading typescript compiler to 2.3.2 and removing @types/whatwg-fetch from package.json

Shruti

Sent from my iPhone

On Sep 23, 2017, at 5:57 PM, Neil Zimmerman notifications@github.com wrote:

@Loghorn this started after 3cc32b8

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@shrutic what did you use instead of types/whatwg-fetch?

Whatwg-fetch is built into typescript now . So no changes to code

Sent from my iPhone

On Sep 29, 2017, at 9:31 AM, Pavel notifications@github.com wrote:

@shrutic what did you use instead of ?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jbreckmckye picture jbreckmckye  Â·  3Comments

Zzzen picture Zzzen  Â·  3Comments

fasatrix picture fasatrix  Â·  3Comments

csharpner picture csharpner  Â·  3Comments

Loghorn picture Loghorn  Â·  3Comments