# My compiler says that the @openzeppelin contracts don't match the compiler!

**URL:** <https://forum.openzeppelin.com/t/my-compiler-says-that-the-openzeppelin-contracts-dont-match-the-compiler/22810>\
**Category:** Contracts\
**Tags:** erc721, truffle, hardhat\
**Created:** [January 17, 2022, 12:29am UTC](https://forum.openzeppelin.com/t/my-compiler-says-that-the-openzeppelin-contracts-dont-match-the-compiler/22810 "2022-01-17T00:29:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShadowQueen639](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/shadowqueen639/32/10760_2.png) [@ShadowQueen639](https://forum.openzeppelin.com/u/ShadowQueen639)\
**Post date:** [January 17, 2022, 12:29am UTC](https://forum.openzeppelin.com/t/my-compiler-says-that-the-openzeppelin-contracts-dont-match-the-compiler/22810/1 "2022-01-17T00:29:22Z")

</div>

I'm trying to create my first smart contract. It's for ERC721 and I'm using Visual Studios. I have run into the same problem while trying to use 2 different programs (I tried to change programs when one wouldn't work and all of the fixes I could find didn't help).

# When using Truffle I enter the command "truffle compile" and get the message Compiling your contracts...

> Everything is up to date, there is nothing to compile.  
> but my files aren't compiled.

when I try to use Hardhat by entering "npx hardhat compile" I get

Error HH606: The project cannot be compiled, see reasons below.

The Solidity version pragma statement in these files don't match any of the configured compilers in your config. Change the pragma or configure additional compiler versions in your hardhat config.

- contracts/sq639families.sol (^0.8.0)
- @openzeppelin/contracts/utils/Counters.sol (^0.8.0)
- @openzeppelin/contracts/token/ERC721/ERC721.sol (^0.8.0)
- @openzeppelin/contracts/utils/introspection/ERC165.sol (^0.8.0)
- @openzeppelin/contracts/utils/introspection/IERC165.sol (^0.8.0)
- @openzeppelin/contracts/token/ERC721/IERC721.sol (^0.8.0)
- @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol (^0.8.0)
- @openzeppelin/contracts/utils/Strings.sol (^0.8.0)
- @openzeppelin/contracts/utils/Context.sol (^0.8.0)
- @openzeppelin/contracts/utils/Address.sol (^0.8.0)
- @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol (^0.8.0)

I have checked that both my hardhat.config.js file and all of the referenced @openzepelin files have the solidity 0.8.0. I have no idea where to go from here. Please help.

---

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [January 17, 2022, 1:33am UTC](https://forum.openzeppelin.com/t/my-compiler-says-that-the-openzeppelin-contracts-dont-match-the-compiler/22810/2 "2022-01-17T01:33:22Z")

</div>

Hi, welcome! 👋

So did you set config? Did you specify the compiler version?  
For truffle, you can have a look at this: [Configuration - Truffle Suite](https://trufflesuite.com/docs/truffle/reference/configuration.html#location)

For hardhat, you can have a look at this: [Configuration | Hardhat | Ethereum development environment for professionals by Nomic Labs](https://hardhat.org/config/#available-config-options)

---

<div class="post-metadata">

**Author:** ![ShadowQueen639](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/shadowqueen639/32/10760_2.png) [@ShadowQueen639](https://forum.openzeppelin.com/u/ShadowQueen639)\
**Post date:** [January 17, 2022, 1:41am UTC](https://forum.openzeppelin.com/t/my-compiler-says-that-the-openzeppelin-contracts-dont-match-the-compiler/22810/3 "2022-01-17T01:41:34Z")

</div>

I have checked and made sure that the version I'm using is set in the config and the same on all of the files, they are all 0.8.11

---

<div class="post-metadata">

**Author:** ![ShadowQueen639](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/shadowqueen639/32/10760_2.png) [@ShadowQueen639](https://forum.openzeppelin.com/u/ShadowQueen639)\
**Post date:** [January 17, 2022, 1:42am UTC](https://forum.openzeppelin.com/t/my-compiler-says-that-the-openzeppelin-contracts-dont-match-the-compiler/22810/4 "2022-01-17T01:42:49Z")

</div>

I also tried having them all on the 0.8.0 but it didn't work any better

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [January 18, 2022, 11:59pm UTC](https://forum.openzeppelin.com/t/my-compiler-says-that-the-openzeppelin-contracts-dont-match-the-compiler/22810/5 "2022-01-18T23:59:00Z")

</div>

Please share your Hardhat config.

---

<div class="post-metadata">

**Author:** ![\_fense](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/_fense/32/19771_2.png) [@\_fense](https://forum.openzeppelin.com/u/_fense)\
**Post date:** [November 23, 2023, 1:22pm UTC](https://forum.openzeppelin.com/t/my-compiler-says-that-the-openzeppelin-contracts-dont-match-the-compiler/22810/6 "2023-11-23T13:22:34Z")

</div>

try looking into your hardhat config you might have changed the remote compiler but must have forgot to change the solidity version in the hardhat config
