Errors in contract verification

Hello, after deploying my contract from Remix, I wanted to verify it via EtherScan. But at the end of the verification it gives me errors :

Error! Unable to generate Contract ByteCode and ABI (General Exception, unable to get compiled [bytecode])

ParserError: Source "@openzeppelin/contracts/token/ERC721/ERC721.sol" not found: File import callback not supported
 --> myc:5:1:
  |
5 | import "@openzeppelin/contracts/token/ERC721/ERC721.sol"
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ParserError: Source "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol" not found: File import callback not supported
 --> myc:6:1:
  |
6 | import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ParserError: Source "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol" not found: File import callback not supported
 --> myc:7:1:
  |
7 | import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ParserError: Source "@openzeppelin/contracts/utils/Counters.sol" not found: File import callback not supported
 --> myc:8:1:
  |
8 | import "@openzeppelin/contracts/utils/Counters.sol"
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ParserError: Source "@openzeppelin/contracts/access/Ownable.sol" not found: File import callback not supported
 --> myc:9:1:
  |
9 | import "@openzeppelin/contracts/access/Ownable.sol"
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ParserError: Source "@openzeppelin/contracts/security/ReentrancyGuard.sol" not found: File import callback not supported
  --> myc:10:1:
   |
10 | import "@openzeppelin/contracts/security/ReentrancyGuard.sol"
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I looked on forums, or sometimes people just re copy the code and it works. But for me nothing I did check that everything was good and that Remix had no errors in the compilation but still the same problem.

If you have any solutions I'm interested, thanks to you

Please refer to our guide on verification:

1 Like