-
Notifications
You must be signed in to change notification settings - Fork 976
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
Next.js 12: Cannot find module useWalletModal #246
Comments
Please check out the Next-based nextjs-starter project in the repo. There's also the example project that uses Next. The issue is very likely with your project configuration. https://github.com/solana-labs/wallet-adapter#build-from-source The steps here should help, just replace the last step with building the nextjs-starter project. |
@jordansexton it looks like this example is broken on nextjs version 12. |
Thanks @stanleycyang! Would you be interested in opening a branch + PR to update the nextjs-starter and example starter projects to use Next 12? |
Also having the same issue with a fresh project created with create-next-app 12.0.7 and using the sample code from this repo. From what I saw seemed to be caused by the .js extensions used in the esm versions. I tried changing one of the imports that was erroring from .js to .mjs and it was happy with that (just got another error about a different file so can't say 100% it fixes everything). |
@gpoole any chance you'd be willing to PR a change to cause the ESM builds to output mjs files and see if it fixes it? |
For anyone that needs a temporary workaround, please use the Next.js 11-based starter project. |
I had a look at doing a PR for this @jordansexton, but it seems like the fix might be more general. I'd say that this issue is a specific instance of #241, but they're basically caused by the ESM strict resolution problem from what I can see. |
#254 will fix this when merged. |
Published:
|
Describe the bug
![Screen Shot 2022-01-05 at 9 58 15 PM](https://user-images.githubusercontent.com/3037893/148336020-7df14dc7-93ec-4efb-b4c2-9b1cb6e5024d.png)
When deploying to production, I'm seeing this error happen:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The
useWalletModal
should be providedDesktop (please complete the following information):
The text was updated successfully, but these errors were encountered: