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

Build issue with nextJS #45

Closed
nichochar opened this issue Mar 3, 2023 · 5 comments · Fixed by #47
Closed

Build issue with nextJS #45

nichochar opened this issue Mar 3, 2023 · 5 comments · Fixed by #47
Assignees
Labels
Package: connect-wallet SEV-3 Normal Severity Type: Bug 🐛 Something isn't working

Comments

@nichochar
Copy link

nichochar commented Mar 3, 2023

Followed the instructions of the getting started, but couldn't get a nextJS app running (typescript)

I believe you should probably pin the versions of wagmi and ethers you're using, because they change a lot.

Error:

Error: Cannot find module '/Users/nicholascharriere/privy/shopify-connect/node_modules/ethers/lib/utils' imported from /Users/nicholascharriere/privy/shopify-connect/node_modules/@shopify/connect-wallet/dist/index.js
Did you mean to import ethers/lib/utils.js?
@QuintonC
Copy link
Collaborator

QuintonC commented Mar 3, 2023

Hey @nichochar 👋

We're currently working on resolving these issues with Webpack-based bundlers to resolve the ESM exported packages right now 😄

The issue related to ethers was resolved in #33

There are other related issues that are being resolved with these bundlers (here's a current list):

The latter of the two (#37 and #44) are to be merged here shortly, and then there are likely two more issues to resolve with the QueryClient for React Query + Wagmi as well as our state logger.

I'll keep this issue open and update you periodically as we work to resolve the issue 🙌

@QuintonC QuintonC self-assigned this Mar 3, 2023
@QuintonC QuintonC added Type: Bug 🐛 Something isn't working SEV-3 Normal Severity Package: connect-wallet labels Mar 3, 2023
@nichochar
Copy link
Author

Thanks for the quick response.
Indeed that ticket is exactly my issue. I also solved it with that modified import within the node modules and then ran into the other issue that PR describes with redux. Great minds 🧠.

Let me know if there is an alpha/beta version of the library I can use when the changes land. Appreciate it.

@QuintonC
Copy link
Collaborator

QuintonC commented Mar 3, 2023

@nichochar You can test a snapshot version using the following versions:

yarn add @shopify/connect-wallet@0.0.0-snapshot-20230303202422
yarn add @shopify/gate-context-client@0.0.0-snapshot-20230303202422

If you don't mind, can you let us know if these work for you? Here is a CodeSandbox repro if you need some help getting the package set up in Next. We're looking forward to hearing from you soon 😄

@nichochar
Copy link
Author

Yes, it worked. This unblocks me as I'm in the prototyping phase. Thanks

@QuintonC
Copy link
Collaborator

QuintonC commented Mar 3, 2023

Yes, it worked. This unblocks me as I'm in the prototyping phase. Thanks

Nice! That's wonderful news.

Feel free to share your creation in the discussions show and tell category. We're looking forward to seeing what you create 😄

I'm going to go ahead and close this issue. Please feel free to re-open it if you need anything additional support or feel free to open another 🙌

@QuintonC QuintonC closed this as completed Mar 3, 2023
@QuintonC QuintonC linked a pull request Mar 3, 2023 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: connect-wallet SEV-3 Normal Severity Type: Bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants