Not sure if this is the right sub to ask. I'm using expo managed react native app with yarn and my package manager.
I added bitcoin-lib-cash package to my dependencies however, when starting up my simulator, it crashes with the below message:
Unable to resolve module crypto from ~/node_modules/bitcore-lib-cash/lib/crypto/hash.js: crypto could not be found within the project. If you are sure the module exists, try these steps: 1. Clear watchman watches: watchman watch-del-all 2. Delete node_modules and run yarn install 3. Reset Metro's cache: yarn start --reset-cache 4. Remove the cache: rm -rf /tmp/metro-* 1 | 'use strict'; 2 | > 3 | var crypto = require('crypto'); | ^ 4 | var BufferUtil = require('../util/buffer'); 5 | var $ = require('../util/preconditions'); 6 |
I tried the above steps but no success. Also tried directly installing 'crypto' lib to my package.json file produces a different error.
I'm not sure the source of err.