React cannot resolve 'crypto' by default.
AnujTimsina opened this issue · 0 comments
AnujTimsina commented
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'"
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 .