OpenZeppelin/openzeppelin-contracts

[{ "resource": "/D:/NFT/contracts/MyNft.sol", "owner": "_generated_diagnostic_collection_name_#0", "code": "6275", "severity": 8, "message": "Source \"@openzeppelin/contract/token/ERC721/extensions/ERC721URIStorage.sol\" not found: File import callback not supported", "startLineNumber": 8, "startColumn": 1, "endLineNumber": 8, "endColumn": 78 }]

Ajinkya-kamble7 opened this issue · 1 comments

💻 Environment//SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contract/token/ERC721/extensions/ERC721URIStorage.sol";

contract MyNft is ERC721URIStorage, Ownable{

using Counters for Counters.Counter;

Counter.Counter private _tokenIds;
constructor() ERC721("MY Nft","CRE"){}
function mintnft(address recipient,string memory tokenURI)public onlyOwner returns(uint264){
  _tokenIds.increment();
}

}

📝 Details

🔢 Code to reproduce bug

Closing as it's duplicate of #5064.