3 Answers
I ran into the same thing and had to downgrade to version 3.
npm i react-query@3
Or for 4+
npm i @tanstack/react-query
1 Comment
Jatin Nagla
Alright this actually solved my problem. I have to install a downgraded version of react-query
It's because you are importing into a TypeScript file and it can't find the type declaration for the imported module. Normally all you need to do is to follow the given instructions and open a command prompt, go to the directory D:\overview and type:
npm i --save-dev @types/react-query
2 Comments
Jatin Nagla
I tried this solution which you have suggested but it is not working
Mike Lowery
Because no such type dependency exists. This answer is wrong.