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

bug: Module not found: Can't resolve 'encoding' in #2425

Closed
1 task done
Seranged opened this issue May 25, 2023 · 4 comments
Closed
1 task done

bug: Module not found: Can't resolve 'encoding' in #2425

Seranged opened this issue May 25, 2023 · 4 comments

Comments

@Seranged
Copy link
Sponsor Contributor

Seranged commented May 25, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Package Version

0.12.13

Current Behavior

Hey Guys,

I've been having an issue with Trezor-WebConnect over the last few weeks (trezor/trezor-suite#8506) that we've been sorting, they've recently pushed a version (v.9.0.11) that fixed their dependency issues. Now the front end branch dealing with that issue is having a similar issue with WalletConnect and Wagmi.

Re: you guys, I'll update the branch repo to ^v1 in the morning (Euro time) and see if the issue persists

Here is the branch: https://github.com/Seranged/EVM-FE-Bootstrap/tree/trezor-nextjs-issue-reproduction

Issue:

`Module not found: Can't resolve 'encoding' in '/Users/serranged/Documents/GitHub/EVM-bootstrap/node_modules/node-fetch/lib'

Import trace for requested module:
./node_modules/node-fetch/lib/index.js
./node_modules/cross-fetch/dist/node-ponyfill.js
./node_modules/@walletconnect/jsonrpc-http-connection/dist/cjs/http.js
./node_modules/@walletconnect/jsonrpc-http-connection/dist/cjs/index.js
./node_modules/@walletconnect/legacy-provider/dist/cjs/index.js
./node_modules/@wagmi/connectors/dist/walletConnectLegacy.js
./node_modules/@wagmi/core/dist/connectors/walletConnectLegacy.js
./node_modules/wagmi/dist/connectors/walletConnectLegacy.js
./node_modules/@rainbow-me/rainbowkit/dist/index.js
./src/app/layout.tsx`

trezor/trezor-suite#8506

Expected Behavior

No console error (module imported successfully)

Steps To Reproduce

https://github.com/Seranged/EVM-FE-Bootstrap/tree/trezor-nextjs-issue-reproduction

Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)

No response

Anything else?

No response

@jxom
Copy link
Member

jxom commented May 25, 2023

WalletConnect v1 issue. Add this line to your next config: https://github.com/wagmi-dev/create-wagmi/blob/main/templates/next/rainbowkit/next.config.js#L5

@jxom jxom closed this as completed May 25, 2023
@0xPT
Copy link

0xPT commented Jun 9, 2023

Seems like this is a problem with a few modules:

'lokijs' in @WalletConnect,
'pino-pretty' in @WalletConnect,
'encoding' in @safe-global

Tried your recommendation above & didn't fix it @jxom

I'm using the non-legacy WalletConnect FYI

@Ha2ryZhang
Copy link

Copy link
Contributor

github-actions bot commented Jan 7, 2024

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest wagmi version. If you have any other comments you can create a new discussion.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants