Skip to content

Cannot find module 'graphql-request' or its corresponding type declarations. #880

@tofsjonas

Description

@tofsjonas

Screenshot VS Code

Screenshot 2024-05-23 at 09 47 21

Screenshot npx tsc --noEmit

Screenshot 2024-05-23 at 09 51 43

Description

When installing 7.0.1 typescript fails. 6.1.0 works as expected.

I have tried with both pnpm and npm. I haven't tried with yarn.

  • Node v20.11.0
  • Npm 10.5.0
  • Pnpm 9.1.2
  • Apple M1 Pro
  • MacOS Sonoma 14.5 (23F79)
tsconfig.json
{
  "compilerOptions": {
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "target": "ES2021",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true,
    "skipLibCheck": true,
    "strictNullChecks": false,
    "noImplicitAny": false,
    "strictBindCallApply": false,
    "forceConsistentCasingInFileNames": false,
    "noFallthroughCasesInSwitch": false
  }
}

(I have tried with other tsconfig setups, but they all fail.)

Reproduction Steps/Repo Link

Repo: https://github.com/tofsjonas/graphql-request-test
Install and run

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions