ethers v5 - Dependency @ledgerhq/hw-transport-node-hid is crashing Netlify build
See original GitHub issueFor 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:
- with core functionality
- with browser provider using 1.
- 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:
- Created 3 years ago
- Comments:13 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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. 😃
@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…