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
{{ message }}
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.
I have a NodeJS project where I implemented a Ledger sign functionality.
This project is created as a library and can be used standalone as a Node app, or with npm imported in an Angular Web Application.
In my file where I try to connect to the Ledger Device, I import both TransportNodeHID and TransportWebHID and I try to connect to the one that work for current context dynamically.
The problem is when I import this project (as a dependency in the package.json) in my Angular App.
There is something Node specific in TransportNodeHid because I receive at application startup: 'require is not defined')
If I remove TransportNodeHid from the file everything works. What should be the way to go here so I can have this project handling both NodeJS and browser?
Thank you!
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello!
Description
I have a NodeJS project where I implemented a Ledger sign functionality.
This project is created as a library and can be used standalone as a Node app, or with npm imported in an Angular Web Application.
In my file where I try to connect to the Ledger Device, I import both TransportNodeHID and TransportWebHID and I try to connect to the one that work for current context dynamically.
Code sample
The Problem
The problem is when I import this project (as a dependency in the package.json) in my Angular App.
There is something Node specific in
TransportNodeHid
because I receive at application startup: 'require is not defined')If I remove TransportNodeHid from the file everything works. What should be the way to go here so I can have this project handling both NodeJS and browser?
Thank you!
The text was updated successfully, but these errors were encountered: