I have a react project and initialized hardhat config then installed the necessary packages but I am getting error when I require hardhat on my project const hre = require("hardhat");

This is error message when the project is compiling

Module not found: Can't resolve 'console' in 'C:\Users\sss\OneDrive\Desktop\my-react\node_modules\@sentry\node\esm\integrations'

How do I resolve this issue?

  • Are you requiring hardhat from your React code? Because that won't work, hardhat is meant to be executed with node. – Franco Victorio Jan 29 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.