bug: Module not found: Can't resolve '@tanstack/react-query'
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Package Version
0.6.4
Current Behavior
I’m getting this error when running “npm run dev” importing wagmi.
./node_modules/@tanstack/react-query-persist-client/build/umd/index.production.js:11:15
Module not found: Can't resolve '@tanstack/react-query'
Import trace for requested module:
./node_modules/wagmi/dist/wagmi.esm.js
./pages/_app.tsx
https://nextjs.org/docs/messages/module-not-found
In _app.tsx even with this line, it fails:
import { chain, configureChains, createClient, WagmiConfig } from 'wagmi';
Adding this:
npm i @tanstack/react-query
Fixes the problem. But I assume it should be a dependency and auto-install.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Unable to install Tanstack Query · Issue #3793 - GitHub
Describe the bug. Trying to install results in an error. npm i "@tanstack/react-query". Your minimal, reproducible example.
Read more >I was trying to install react-query. But it is not installed. How to ...
[1/4] Resolving packages... error An unexpected error occurred: "https://registry.yarnpkg.com/@tanstack%2freact-query: Not found". info If you ...
Read more >@tanstack/react-query - npm
Hooks for managing, caching and syncing asynchronous and remote data in React. Latest version: 4.20.4, last published: 12 days ago.
Read more >Installation | TanStack Query Docs
You can install React Query via NPM, or a good ol' `` via unpkg.com. ... If you're not using a module bundler or...
Read more >React (TanStack) Query Tutorial for Beginners - Shahed Nasser
Please note that this version uses v4 of React Query which is now named TanStack Query. You can find the code for this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fair enough. I can’t reproduce it 100% of the time on my side but if I find a way, I’ll post it here.
Should we reopen this issue because it seems it’s not been solved (or at least a good workaround has not been found)?