With React Native Expo V4.13.0, importing the web3 V1.6.1 module, I get the following error:
Unable to resolve module crypto from /Users/black/Desktop/test/node_modules/web3-eth-accounts/lib/index.js: crypto could not be found within the project or in these directories:
node_modules/web3-eth-accounts/node_modules
node_modules
../../node_modules
If you are sure the module exists, try these steps:
- Clear watchman watches: watchman watch-del-all
- Delete node_modules
- Run yarn install Reset Metro's cache: yarn start --reset-cache
- Remove the cache: rm -rf /tmp/metro-*
24 | var Method = require('web3-core-method'); 25 | var Account = require('eth-lib/lib/account'); 26 | var cryp = (typeof global === 'undefined') ? require('crypto-browserify') : require('crypto'); | ^ 27 | var scrypt = require('scrypt-js'); 28 | var uuid = require('uuid'); 29 | var utils = require('web3-utils');`
Yesterday I updated the version of expo and it no longer worked, before it worked fine.
Does anyone have the same problem?