Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Error: Component must be wrapped with <Container.Provider>" in Next.js #209

Open
remjx opened this issue Jan 31, 2022 · 0 comments
Open

Comments

@remjx
Copy link

remjx commented Jan 31, 2022

I'm getting this error when trying to implement WalletKit in Next.js:

Error: Component must be wrapped with <Container.Provider>
    at Object.useContainer (/home/markj/myapp/node_modules/unstated-next/dist/unstated-next.js:21:13)
    at useContainer (/home/markj/myapp/node_modules/unstated-next/dist/unstated-next.js:33:20)
    at useSolana (/home/markj/myapp/packages/mypackage/node_modules/@saberhq/use-solana/dist/cjs/context.js:66:58)
    at useWallet (/home/markj/myapp/packages/mypackage/node_modules/@saberhq/use-solana/dist/cjs/hooks.js:9:45)
    at useConnectedWallet (/home/markj/myapp/packages/mypackage/node_modules/@saberhq/use-solana/dist/cjs/hooks.js:20:35)
    at GokiWallet (webpack-internal:///./components/GokiWallet/GokiWallet.tsx:33:91)
    at processChild (/home/markj/myapp/node_modules/react-dom/cjs/react-dom-server.node.development.js:3353:14)
    at resolve (/home/markj/myapp/node_modules/react-dom/cjs/react-dom-server.node.development.js:3270:5)
    at ReactDOMServerRenderer.render (/home/markj/myapp/node_modules/react-dom/cjs/react-dom-server.node.development.js:3753:22)
    at ReactDOMServerRenderer.read (/home/markj/myapp/node_modules/react-dom/cjs/react-dom-server.node.development.js:3690:29)
error - Error: Component must be wrapped with <Container.Provider>

But I do have the hook wrapped in the WalletKit provider as in the example. What could this this error be indicating?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant