Skip to content
This repository was archived by the owner on Jan 8, 2022. It is now read-only.
This repository was archived by the owner on Jan 8, 2022. It is now read-only.

[TypeScript] error TS7016: Could not find a declaration file for module 'node-fetch'. #63

@MrChip53

Description

@MrChip53

I am getting this error when trying to use tsc:

node_modules/@discordjs/rest/dist/lib/handlers/IHandler.d.ts:1:34 - error TS7016: Could not find a declaration file for module 'node-fetch'. '/home/chris/WebstormProjects/socom-discord-bot/node_modules/node-fetch/lib/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/node-fetch` if it exists or add a new declaration (.d.ts) file containing `declare module 'node-fetch';`

1 import type { RequestInit } from 'node-fetch';

It seems to be the same issue as this project had:
apollographql/apollo-tooling#1686

I may be wrong but I believe this package needs to be a dependency of the rest node module.

  • Priority this issue should have – please be realistic and elaborate if possible: Highest, this is breaking TypeScript compilations

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