Zilliqa / zilliqa-js

JavaScript SDK for Zilliqa blockchain
https://www.npmjs.com/package/@zilliqa-js/zilliqa
GNU General Public License v3.0
131 stars 74 forks source link

React cannot resolve 'crypto' by default. #455

Open AnujTimsina opened 2 years ago

AnujTimsina commented 2 years ago

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 .