Skip to content

[TypeScript] Could not find a declaration file for module 'node-fetch' #1686

@kripod

Description

@kripod

When using apollo-env through apollo-server, I get the following error during TypeScript builds:

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

This can be fixed by adding @types/node-fetch as a dependency of apollo-env. Or as an alternative, update node-fetch to v3, as it bundles type declarations with itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions