enter image description here Here is the new error after changing react script version

I am building a development web 3 project and can't figure out why I get this error

WARNING in src/App.js
  Line 2:10:  'useWeb3React' is defined but never used            no-unused-vars
  Line 4:8:   'web3' is defined but never used                    no-unused-vars
  Line 6:7:   'WalletConnect' is assigned a value but never used  no-unused-vars

ERROR in ./node_modules/eth-lib/lib/bytes.js 9:193-227
Module not found: Error: Can't resolve 'crypto' in '/Users/user/Desktop/esample/react-minting-website/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 }

I attach both images. How do I solve this error? Thanks in advance. enter image description here

1 Answer 1


Look at this Moralis forum, I think this may help you - https://forum.moralis.io/t/solved-breaking-change-webpack-5-used-to-include-polyfills-for-node-js-core-modules-by-default/6875

  • Thank i recompiled with the some corrections i saw on the forum but i got the following error
    – BHUNTX.eth
    Commented Jun 14, 2022 at 13:08
  • Plugin "react" was conflicted between "package.json » eslint-config-react-app /Users/user/Desktop/esample/react-minting-website/node_modules/eslint-config-react-app/base.js" and "BaseConfig » /Users/user/node_modules/eslint-config-react-app/base.js". Any idea on how to solve this please Thanks I have also attacked an image of the following error with package.json
    – BHUNTX.eth
    Commented Jun 14, 2022 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.