Not found: File import callback not supported @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol

:1234: Code to reproduce

I am using hardhat latest version to import openzepplin ERC721Enumerable on VS CODE and keep getting this error.
Not found: File import callback not supported @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IWhitelist.sol";

:computer: Environment

Using hardhat version 2.10.1 and dependencies @openzeppelin/contracts": "^4.7.2".

Hi.

I used these imports in the project and it compiles fine. Could you explain where you get that error and provide screenshots if you don't mind.

t's not show error on compile time but when I tried to verify using contract address then shows error

Failed to verify: Error calling ERC721 tokenURI() in contract for Token ID 1

If it's an error with verification then there is no problem with what you have provided. Looks like you are doing a course in LearnWeb3DAO.
I suggest to ask questions there instead of here. You can join their discord here.

As a crash support, you need to mint 1 token and then verify :smiley:

Thanks for your help and guidance :pray:

1 Like