question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ethers v5 - Dependency @ledgerhq/hw-transport-node-hid is crashing Netlify build

See original GitHub issue

For getting ledger work in Browser are those 2 dependencies needed:

 "@ledgerhq/hw-app-eth": "^5.14.0",
 "@ledgerhq/hw-transport-u2f": "^5.13.1", 

Ethers in version v5 is also using @ledgerhq/hw-transport-node-hid which does require native dependency libusb. This dependency is not available in Netlify environment:

Error:

prebuild-install WARN install libusb-1.0.so.0: cannot open shared object file: No such file or directory

Browser only requires @ledgerhq/hw-transport-u2f, so @ledgerhq/hw-transport-node-hid should not be needed. Ideal might be to split hardware wallets package to 3:

  1. with core functionality
  2. with browser provider using 1.
  3. with nodejs provider using 1.

This is just idea of possible solution, there are probably also other options. But removing this dependency would def help cause seems build of v5 (with HW wallets package) might crash in many environments configured for web builds.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ricmoocommented, Apr 24, 2020

See: https://docs.npmjs.com/files/package.json#optionaldependencies

I don’t use yarn. I try to stick with the default and minimal tool chain, so I don’t force other to use things they don’t want to. 😃

0reactions
ricmoocommented, Nov 24, 2020

@jurosh Can you see if the latest version still causes issues for you?

The ESM build is now browser-friendly, so hopefully won’t pull this package in on you. But I’m not sure exactly how netify works…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scheduled functions crashes deploys - Netlify Support Forums
From 16:51 (past two hours), all of my builds have been unsuccessful. Everything up until step 7 - deploy site looks normal. The...
Read more >
Netlify Build Crashing On Installing Material UI - Stack Overflow
I am trying to deploy my react application on netlify. It is working fine on my desktop and even npm ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found