You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LedgerHQ/ledgerjs#734 is still relevant and unfixed after more than 3 years and breaks the application as soon as importing e.g. import Transport from '@ledgerhq/hw-transport-webusb'.
This makes a really bad impression for a first-time user of the library which I am expecting more from.
The error stack trace points to a usage of Buffer.alloc(0) which is a Node.js specific global which doesn't work in the browser.
Impacted Library name
@ledgerhq/hw-transport-webusb
Impacted Library version
6.29.4
Describe the bug
LedgerHQ/ledgerjs#734 is still relevant and unfixed after more than 3 years and breaks the application as soon as importing e.g.
import Transport from '@ledgerhq/hw-transport-webusb'
.This makes a really bad impression for a first-time user of the library which I am expecting more from.
The error stack trace points to a usage of
Buffer.alloc(0)
which is a Node.js specific global which doesn't work in the browser.It can easily be replaced with
new Uint8Array(0)
which is supported in all environments, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ArrayExpected behavior
Expect no error like
ReferenceError: Buffer is not defined
to show up.Additional context
No response
The text was updated successfully, but these errors were encountered: