bug: Module not found: Can't resolve '@tanstack/react-query'

See original GitHub issue

Is 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:closed
  • Created a year ago
  • Reactions:1
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vinchcommented, Aug 24, 2022

We can reopen if someone provides a minimal reproducible example.

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.

1reaction
vinchcommented, Aug 23, 2022

Should we reopen this issue because it seems it’s not been solved (or at least a good workaround has not been found)?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found