Tengo un problema con la librería web3, al cargar el proyecto en el servidor me arroja estos errores:
Compiled with problems:
ERROR in ./node_modules/cipher-base/index.js 3:16-43
Module not found: Error: Can't resolve 'stream' in 'D:\AAACURSOS\proyecto_platzipunks\platzi-punks-interface\node_modules\cipher-base'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
- install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "stream": false }
ERROR in ./node_modules/eth-lib/lib/bytes.js 9:193-227
Module not found: Error: Can't resolve 'crypto' in 'D:\AAACURSOS\proyecto_platzipunks\platzi-punks-interface\node_modules\eth-lib\lib'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }
y los errores siguen....
A pesar de que solamente tenga instalada esta librería, igual me aparecen cada vez que la importo con:
import Web3 from 'web3'; en App.js
también probé descargar los archivos de la clase, pero igual me siguen apareciendo estos errores. Se agradece cualquier ayuda.