Apollo-server: TS2688: Cannot find type definition file for 'make-fetch-happen'

Created on 30 Jun 2020  ยท  3Comments  ยท  Source: apollographql/apollo-server

Facing type error with @apollo/gateway v0.16.10:

"C:\Program Files\nodejs\node.exe" C:\Users\xxx\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js run start:dev
yarn run v1.22.4
$ cross-env NODE_ENV=development nest start --watch

[17:56:47] Starting compilation in watch mode...

node_modules/@apollo/gateway/dist/index.d.ts:1:23 - error TS2688: Cannot find type definition file for 'make-fetch-happen'.

1 /// <reference types="make-fetch-happen" />
                        ~~~~~~~~~~~~~~~~~

[17:56:51] Found 1 error. Watching for file changes.

Test repo: https://github.com/razorness/nestjs-apollo-gateway-make-fetch-happen

  • checkout
  • run yarn
  • run yarn build (may you need nest cli by yarn global add @nestjs/cli)

Probably related to: https://github.com/apollographql/apollo-server/pull/4326/commits/b5cd43c5c2b321ba34a394a237d3d27350366b65

Last working version: v0.16.9

Please start pull request for typings to make-fetch-happen as already asked in npm/make-fetch-happen#20 or push into https://github.com/DefinitelyTyped/DefinitelyTyped.

bug ๐Ÿ‘ฉโ€๐Ÿš€ federation ๐Ÿงฌ typings

All 3 comments

@razorness the fix for this is in the latest release of @apollo/[email protected]. Please let me know if you run into any trouble!

Fix works well. Thank you very much!

Thanks for reporting back! I agreed with your recommendation enough to go ahead and just put that typings PR together, feel free to track progress here: https://github.com/npm/make-fetch-happen/pull/31

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manuelfink picture manuelfink  ยท  3Comments

espoal picture espoal  ยท  3Comments

veeramarni picture veeramarni  ยท  3Comments

Magneticmagnum picture Magneticmagnum  ยท  3Comments

danilobuerger picture danilobuerger  ยท  3Comments