redux-toolkit icon indicating copy to clipboard operation
redux-toolkit copied to clipboard

@rtk-query/graphql-request-base-query causing "Cannot find module './GraphqlBaseQueryTypes' or its corresponding type declarations"

Open ryanrouleau opened this issue 3 years ago • 1 comments

I'm implementing the graphql/rtk-query codegen (and it's been great so far).

But I'm having this lingering issue where typescript is complaining that it can't find /GraphqlBaseQueryTypes. See the below console output:

ERROR in <omitted for privacy>/node_modules/@rtk-query/graphql-request-base-query/dist/index.d.ts(4,50):
TS2307: Cannot find module './GraphqlBaseQueryTypes' or its corresponding type declarations.
Version: typescript 4.1.6

I see the file it's referencing in an adjacent folder: Screen Shot 2022-04-21 at 3 56 55 PM

Manually editing the import it to ../src/GraphqlBaseQueryTypes makes it work but isn't really a solution.

Is this an issue with my local TS setup or is there something else going on?

Thanks so much, appreciate it.

ryanrouleau avatar Apr 21 '22 21:04 ryanrouleau

Fixed by adding "skipLibCheck": true in tsconfig.json 🤷

ryanrouleau avatar Apr 22 '22 19:04 ryanrouleau