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

🐛 Bug - type declaration not found in generated sdk #102

Open
adharshchottu opened this issue Aug 6, 2023 · 1 comment
Open

🐛 Bug - type declaration not found in generated sdk #102

adharshchottu opened this issue Aug 6, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@adharshchottu
Copy link

Bug report

Summary

when generating the sdk.ts using yarn graphql-codegen:generate, Cannot find module 'graphql-request/dist/types.dom' or its corresponding type declarations.ts(2307) error in sdk.ts:2

Environment

node version: 18.17.0
yarn version: 1.22.19

Steps to reproduce

yarn graphql-codegen:generate

Expected results

working SDK

Actual results

error in sdk.ts file. Cannot find module 'graphql-request/dist/types.dom' or its corresponding type declarations.ts(2307)

@adharshchottu adharshchottu added the bug Something isn't working label Aug 6, 2023
@mahouhou
Copy link

mahouhou commented Dec 20, 2023

Edit: I just downgraded graphql-request to the lowest version 5 and it fixed the issue.

I have this same issue, I tried updating and also downgrading graphql-request, or commenting out the line. I now can't run the codegen script to update types for new queries. I'm not sure what's triggered this bug. It was fine until today (after several weeks of development) when I added a new query and installed the React Fontawesome package. If I undo my changes however, the bug remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants