I have created a react app, when I try npm run
, I am getting this error:
ERROR in ./node_modules/@toruslabs/eccrypto/browser.js 9:17-34
Module not found: Error: Can't resolve 'crypto'
Dependencies in package.json looks like this:
"dependencies": {
"@project-serum/anchor": "^0.24.2",
"@solana-mobile/wallet-adapter-mobile": "^0.9.0",
"@solana/wallet-adapter-base": "^0.9.13",
"@solana/wallet-adapter-react": "^0.15.15",
"@solana/wallet-adapter-react-ui": "^0.9.13",
"@solana/wallet-adapter-wallets": "^0.18.2",
"@solana/web3.js": "^1.53.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.1.1",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.0.0",
"react-scripts": "5.0.1",
"stream": "^0.0.2",
"web-vitals": "^2.1.4"
},
Node.js v17.3.0
Any idea how to resolve this?