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

MetaMask throws error when used via SDK via ESM (JsDelivr) #2317

Open
1 task
paylinkprotocol opened this issue Nov 29, 2024 · 0 comments
Open
1 task

MetaMask throws error when used via SDK via ESM (JsDelivr) #2317

paylinkprotocol opened this issue Nov 29, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@paylinkprotocol
Copy link

paylinkprotocol commented Nov 29, 2024

Current Behavior

Our issue in a nutshell: When relying just on the injected wallets like this:

const wallets = [injectedModule()]

we can easily connect via chrome browser on desktop, but on smartphone, no MM is shown.

When importing the web3-onboard MM module and extending the wallets by

const wallets = [metamask, injectedModule()]

We get this Error: Uncaught (in promise) SyntaxError: The requested module '/npm/[email protected]/+esm' does not provide an export named 'EventEmitter2' (at jsdelivr-header.js:7:1)

Beside of that, my code is like the Get Started ()

Important note: I import all these libraries via ESM (jsdelivr.com, the latest versions)

Due to the fact i can connect with MM, even with smartphone, when using this Example: , is assume the reason is a misconfigured/mis-bundled ESM

Expected Behavior

It works like in the example of Blocknative

Steps To Reproduce

No response

What package is effected by this issue?

@web3-onboard/injected-wallets

Is this a build or a runtime issue?

Runtime

Package Version

the latest (2.23.0)

Node Version

No response

What browsers are you seeing the problem on?

Chrome

Relevant log output

Uncaught (in promise) SyntaxError: The requested module '/npm/[email protected]/+esm' does not provide an export named 'EventEmitter2' (at jsdelivr-header.js:7:1)

Anything else?

No response

Sanity Check

  • If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.
@paylinkprotocol paylinkprotocol added the bug Something isn't working label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants