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

[email protected] doesn't include node-fetch in its dependencies #3580

Closed
ghost opened this issue Dec 4, 2019 · 4 comments · Fixed by #3662
Closed

[email protected] doesn't include node-fetch in its dependencies #3580

ghost opened this issue Dec 4, 2019 · 4 comments · Fixed by #3662

Comments

@ghost
Copy link

ghost commented Dec 4, 2019

After upgrade from [email protected] to [email protected], TypeScript fails because it can't find the types for node-fetch:

node_modules/apollo-env/lib/fetch/fetch.d.ts(6,195): error TS7016: Could not find a declaration file for module 'node-fetch'. '/home/Proyectos/server/node_modules/node-fetch/lib/index.js' implicitly has an 'any' type.
  Try `npm install @types/node-fetch` if it exists or add a new declaration (.d.ts) file containing `declare module 'node-fetch';`

Similar to: #3471

EDIT: The trouble continue in version [email protected]

@ghost ghost changed the title [email protected] doesn't include node-fetch in its dependencies [email protected] doesn't include node-fetch in its dependencies Dec 4, 2019
@trevor-scheer
Copy link
Member

Hey @localnet, thanks for reporting this. Would you (or anyone) with a reproduction handy please provide me with steps to reproduce or a reproduction that I can clone? I'm having a hard time triggering this error myself.

Another useful bit of information for me would be the output of npm ls apollo-env. Based on the error, I'm wondering if apollo-env is stuck on an incompatible version and/or duplicated within your project due to a bad package-lock.json update.

@ghost
Copy link
Author

ghost commented Jan 8, 2020

@trevor-scheer, the requested repository: https://github.com/localnet/apollo

npm install
npm run build

node_modules/apollo-env/lib/fetch/fetch.d.ts(6,195): error TS7016: Could not find a declaration file for module 'node-fetch'.

@trevor-scheer
Copy link
Member

Hey @localnet, thanks for the report and quick follow up. Can you please try out apollo-server-*@2.9.16 and let me know your results? Everything appears to be working for me now.

@ghost
Copy link
Author

ghost commented Jan 10, 2020

Yeah, it is solved. Thanks @trevor-scheer.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant