blocknative / web3-onboard

Client library to onboard users to web3 apps
https://onboard.blocknative.com/
MIT License
817 stars 479 forks source link

[Bug]: Ledger module is broken in Nuxt #1433

Closed JackHamer09 closed 1 year ago

JackHamer09 commented 1 year ago

Current Behavior

When trying to use Ledger module you'll always see the error about missing files.

Here is the example code:

import Onboard from "@web3-onboard/core";
import injectedModule from "@web3-onboard/injected-wallets";
import ledgerModule from "@web3-onboard/ledger";

Onboard({
        wallets: [
          injectedModule(),
          ledgerModule(),
       ]
});

Error:

These dependencies were not found:

* @ledgerhq/cryptoassets/data/eip712 in ./node_modules/@ledgerhq/hw-app-eth/lib-es/modules/EIP712/EIP712.utils.js
* @ledgerhq/cryptoassets/data/erc20-signatures in ./node_modules/@ledgerhq/hw-app-eth/lib-es/services/ledger/erc20.js
* @ledgerhq/devices/hid-framing in ./node_modules/@ledgerhq/hw-transport-webusb/lib-es/TransportWebUSB.js

Expected Behavior

Ledger wallet is correctly initialised and displayed in the wallets list

Steps To Reproduce

No response

What package is effected by this issue?

@web3-onboard/ledger

Is this a build or a runtime issue?

Build

Package Version

2.3.2

Node Version

v16.14.0

What browsers are you seeing the problem on?

No response

Relevant log output

No response

Anything else?

@web3-onboard/ledger version 2.3.2. @web3-onboard/core version 2.11.1. I'm using Onboard with nuxt 2.15.7 and installing the packages with yarn.

Sanity Check

Adamj1232 commented 1 year ago

@JackHamer09 thanks for surfacing this issue. We have a section in our docs for Nuxt here that may help. Have you had a chance to checkout our W3O examples in the repo? We dont have a Nuxt specific example yet but we do have a couple of next examples. This area of the Nuxt docs may be helpful as well -> https://nuxtjs.org/docs/directory-structure/plugins/#client-or-server-side-only Please report back if you are able to get it working. If not we may be able to get an example together but may take sometime with the holidays approaching and other backlog items. Thanks!

Adamj1232 commented 1 year ago

@JackHamer09 is this issue still persisting? We recently updated our Ledger package to the latest Ledger deps and I would be interested if this new packages is still causing you issue. Thanks!

JackHamer09 commented 1 year ago

Seems to be working fine now! Thanks!