zilliqa-js icon indicating copy to clipboard operation
zilliqa-js copied to clipboard

React cannot resolve 'crypto' by default.

Open AnujTimsina opened this issue 2 years ago • 0 comments

Describe the bug React-scripts 5.0.1 cannot resolve 'crypto' by default.

To Reproduce

Steps to reproduce the behavior:

  1. Create a react app.
  2. npm install @zilliqa/zilliqa
  3. import Zilliqa from '@zilliqa-js/zilliqa'
  4. In terminal, it shows " Can't resolve 'crypto' in 'G:\node_modules\hdkey\lib'"

Screenshots image image image

Desktop (please complete the following information):

103.0.5060.114

Smartphone (please complete the following information):

Additional context This can be solved by changing react-scripts dependencies inpackage.json from 5.0.1 to 4.0.3 .

AnujTimsina avatar Jul 11 '22 04:07 AnujTimsina