reactjsweb3-react

I want to add web3 package to react project - BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default


I add web3 package to my react project and start.

yarn add web3

yarn start

But it causes following errors:

...
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
...

Solution

  • I fixed these issues for 4 days. Then I found the reason of this problem.

    I changed to lower version of mainly 2 of packages - react-router-dom and react-scripts.

    ex: 
    react-scripts - 5.0.0 : error causes
    react-scripts - 4.0.3 : success