Open MichaelBrink opened 3 years ago
can you try to do
import Str from "@ledgerhq/hw-app-str";
?
Yeah had that initially, but same err response (same with TransportU2F), this doesn't seem to make a difference.
@gre :
I am basically running this example script and the only modification I made was changing Transport.create
to TransportU2F.default.open
(which I don't think is affecting the err: TypeError: Str is not a constructor
)
@gre I am sitting with a similar 'Not a constructor' issue. Could it be related to the ES6 module?
can you try to do
import Str from "@ledgerhq/hw-app-str";
?
@gre would appreciate any other suggestions, please
@gre Resolved this by using webpack to compile - this dealt with the CJS vs ES export/import inconsistency
Ok thanks. Good to know, we will need to improve this in future.
Getting a typeerror when invoking the Str constructor from @ledgerhq/hw-app-str (trying to execute a few basic stellar-sdk command)
node -v -> v.14.15.1 "@ledgerhq/hw-app-str": "^5.34.0", "@ledgerhq/hw-transport-u2f": "^5.34.0", "stellar-sdk": "^7.0.0"
code snippit:
The error I am getting is:
(node:28256) UnhandledPromiseRejectionWarning: TypeError: Str is not a constructor
Any guidance would be appreciated, ty