Hello, I have this error that I get when configuring a new project with expo, I have read several solutions applied apparently from webpack 5 and nothing, I run the project but when compiling to production it does not do it due to the errors. I attach the error and the package
ERROR in ./node_modules/@toruslabs/eccrypto/browser.js:9
Module not found: Can't resolve 'crypto'
7 | var subtle = browserCrypto.subtle || browserCrypto.webkitSubtle;
8 |
> 9 | var nodeCrypto = require('crypto');
10 |
11 | const EC_GROUP_ORDER = Buffer.from('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 'hex');
12 | const ZERO32 = Buffer.alloc(32, 0);
ERROR in ./node_modules/jsonschema/lib/helpers.js:3
Module not found: Can't resolve 'url'
1 | 'use strict';
2 |
> 3 | var uri = require('url');
4 |
5 | var ValidationError = exports.ValidationError = function ValidationError (message, instance, schema, path, name, argument) {
6 | if(Array.isArray(path)){
ERROR in ./node_modules/jsonschema/lib/scan.js:3
Module not found: Can't resolve 'url'
1 | "use strict";
2 |
> 3 | var urilib = require('url');
4 | var helpers = require('./helpers');
5 |
6 | module.exports.SchemaScanResult = SchemaScanResult;
ERROR in ./node_modules/jsonschema/lib/validator.js:3
Module not found: Can't resolve 'url'
1 | 'use strict';
2 |
> 3 | var urilib = require('url');
4 |
5 | var attribute = require('./attribute');
6 | var helpers = require('./helpers');
ERROR in ./node_modules/xhr2-cookies/dist/xml-http-request.js:1
Module not found: Can't resolve 'http'
ERROR in ./node_modules/xhr2-cookies/dist/xml-http-request.js:2
Module not found: Can't resolve 'https'
ERROR in ./node_modules/xhr2-cookies/dist/xml-http-request.js:3
Module not found: Can't resolve 'os'
ERROR in ./node_modules/xhr2-cookies/dist/xml-http-request.js:4
Module not found: Can't resolve 'url'
web compiled with 8 errors and 118 warnings
{
"name": "templatetest",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@fontsource/roboto": "^4.5.8",
"@mui/icons-material": "^5.11.9",
"@mui/material": "^5.11.10",
"@walletconnect/web3-provider": "^1.8.0",
"@web3auth/web3auth": "^2.1.3",
"expo": "~47.0.12",
"expo-status-bar": "~1.4.2",
"magic-sdk": "^13.4.0",
"moralis-v1": "^1.12.0",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-moralis": "^1.4.2",
"react-native": "0.70.5",
"react-native-web": "~0.18.9",
"react-router-dom": "^6.8.1",
"stream": "^0.0.2"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@types/react": "~18.0.14",
"@types/react-native": "~0.70.6",
"typescript": "^4.6.3"
},
"private": true
}