Replies: 3 comments
-
Usually see this in a monorepo or other environment, where there are multiple Wagmi versions installed. Happy to look into it if there's a minimal reproduction. |
Beta Was this translation helpful? Give feedback.
-
@tmm I've been able to repro in a mimimal turborepo example: https://github.com/oveddan/wagmi-hook-issue-example See the simple hook here: https://github.com/oveddan/wagmi-hook-issue-example/blob/main/packages/ui/src/useMint.ts Both the UI package, as well as the web app, are using the same versions of wagmi and viem. |
Beta Was this translation helpful? Give feedback.
-
Having this same issue |
Beta Was this translation helpful? Give feedback.
-
I'm trying to write an external library of helper hooks that internally call wagmi's hooks.
For example, this component
useMintable
in my external librarymy-react-lib
:I get this error:
"WagmiProviderNotFoundError:
useConfig
must be used withinWagmiProvider
."...which doesn't make sense since this hook is called from within the wrapped provider component, as seen below:
In my Next app, which im generating using
pnpm wagmi create
:layout.tsx:
providers.tsx:
page.tsx:
Beta Was this translation helpful? Give feedback.
All reactions