zilliqa-js
zilliqa-js copied to clipboard
React cannot resolve 'crypto' by default.
Describe the bug React-scripts 5.0.1 cannot resolve 'crypto' by default.
To Reproduce
Steps to reproduce the behavior:
- Create a react app.
- npm install @zilliqa/zilliqa
- import Zilliqa from '@zilliqa-js/zilliqa'
- In terminal, it shows " Can't resolve 'crypto' in 'G:\node_modules\hdkey\lib'"
Screenshots
Desktop (please complete the following information):
103.0.5060.114Smartphone (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 .