Home > Mobile >  useing web3 in React has error : webpack < 5 used to include polyfills for node.js core modules b
useing web3 in React has error : webpack < 5 used to include polyfills for node.js core modules b

Time:05-29

I tried use web3 in Reactjs but when I import web3 it has error :

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.

I use nodejs 14.18 and webpack 5.5.0

CodePudding user response:

I solved this error with changing react-scripts version to '^4.0.3' according to this link : Example of my Code

  • Related