Error HH404: File @openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol, imported from contracts/chainbattles.sol, not found

When I run npx hardhat compile on my powershell,

PS C:\Users\Administrator\chainbattles> npx hardhat compile
npm WARN config global --global, --local are deprecated. Use --location=global instead.
Solidity 0.8.10 is not fully supported yet. You can still use Hardhat, but some features, like stack traces, might not work correctly.

Learn more at https://hardhat.org/hardhat-runner/docs/reference/solidity-support

Error HH404: File @openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol, imported from contracts/chainbattles.sol, not found.

Does anyone know how to fix it?
Thanks, waiting for your help.

Have you installed the package @openzeppelin/contracts?

Yes.
But Last. I deleted all the files I created and followed the guide from scratch. Done.

Have you solved this problem?

Hey, i have the same problem. can anyone help?

Error HH404: File @openzeppelin/contracts/token/extensions/ERC20Capped.sol, imported from contracts/EXITToken.sol, not found.

which files did you delete? could you share some steps ?

Are you using Windows like the original post?

For the record, Hardhat "strongly recommends" using Windows Subsystem for Linux.

  1. Make sure you preinstalled OpenZeppelin:

    npm install @openzeppelin/contracts
    
  2. Recently, OpenZeppelin literally refactored their internal directory structure, e.g. if you use a bit older coding guides you do probably use unexisting paths. For example, you might do the following:

    import "@openzeppelin/contracts/access/Roles.sol"; // ERROR
    

    BUT this path doesn't exist anymore.

    Instead, try using this

    import "@openzeppelin/contracts/access/AccessControl.sol";