1

Hi we are tying to use the node.js version of the stellar-hd-wallet in ionic-angular. However, calling the StellarHDWallet.generateMnemonic() gives the following error:

ERROR in ./node_modules/stellar-base/lib/transaction.js Module not found: Error: Can't resolve 'crypto'

Any ideas of how to deal with this?

1

Update: Upon my request, the guys from stellar-hd-wallet published a new release (0.10.0) that includes the necessary updates.

2

I made a Git repo to test out your issue, and I wasn't able to reproduce the error:

https://github.com/morleyzhi/stellar-hd-wallet-test

I don't know your specific setup, but can you check the following?

  • Is your project importing a different version of stellar-base? If so, what happens when you remove your project's install of stellar-base?
  • Have you tried deleting node_modules and re-installing?
  • If none of those ideas work, could you point me to a Git repo that reproduces this bug?
  • Did some further research and found out that this issue might be related to the angular 6 breaking webpack compilation github.com/stellar/js-stellar-base/issues/128. The guys from stellar took out the crypto library from stellar base in version 0.13 due to this problem. But the stellar-hd-wallet for Node.js is using version 0.11 – yulemata Apr 19 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.