Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant get to compile #1860

Open
boxingcoder00 opened this issue Apr 7, 2023 · 2 comments
Open

Cant get to compile #1860

boxingcoder00 opened this issue Apr 7, 2023 · 2 comments

Comments

@boxingcoder00
Copy link

Trying to npx hardhat compile my code and i keep getting the option when you first start the project , like this really need help here xoxo
wont compile

@virusbug07
Copy link

Hey @boxingcoder00 make sure that you've installed all the hardhat dependencies!!

@xyz899
Copy link

xyz899 commented Aug 2, 2023

Hi @boxingcoder00 ,

It seems like you're encountering an issue when trying to compile your Hardhat project. The issue you're describing typically occurs when your Hardhat project hasn't been properly initialized, that means it does not contain the required configuration to Compile/Deploy or the hardhat.config.js file is missing or incorrectly configured.

To better assist you with your issue, could you please provide more details about your project setup? Specifically, it would be helpful to know the structure of your project directory (the path where your contracts and scripts are located) and the contents of your hardhat.config.js file.

You should have a hardhat.config.js file in your project root. If you have this file, please check its contents. It should look something like this:

`require("@nomicfoundation/hardhat-toolbox");

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
  solidity: "0.8.19",
};
`

The solidity version should match the version you're using in your smart contracts( here I'm Using 0.8.19 on a basic project ). If you're using a different version, please update this field accordingly.

If you're still encountering issues after checking these, could you please provide more details about the error message you're seeing, or share the contents of your hardhat.config.js file? This will help in diagnosing the issue.

Best Regards,
Younes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants