Why is the inherited function signature not found? "upgradeTo not found or not visible"

Given the following contract:

//SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;

import "./Constants.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155HolderUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";

import "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";


contract MyContract is
  EIP712Upgradeable,
  PausableUpgradeable,
  AccessControlUpgradeable,
  UUPSUpgradeable,
  ERC165StorageUpgradeable,
  Constants,
  ERC1155HolderUpgradeable,
  ReentrancyGuardUpgradeable
{
    uint256 private version;
  function _authorizeUpgrade(address newImplementation)
    internal
    virtual
    override
    onlyRole(Constants.UPGRADER_ROLE)
  {}

  function supportsInterface(bytes4 interfaceId)
    public
    view
    virtual
    override(
      ERC165StorageUpgradeable,
      AccessControlUpgradeable,
      ERC1155ReceiverUpgradeable
    )
    returns (bool)
  {
    return super.supportsInterface(interfaceId);
  }

  // Pauses the contract
  function pause() public virtual onlyRole(Constants.PAUSER_ROLE) {
    _pause();
  }

  // Unpauses the contract
  function unpause() public virtual onlyRole(Constants.PAUSER_ROLE) {
    _unpause();
  }

  // Overide that takes into consideration versioning
  function upgradeTo(address newImplementation) 
    external 
    virtual 
    override  
  {
      version++;
      super.upgradeTo(newImplementation);
    }
}

Why is it not able to trace down the function signature to the only contract inherited in the linearization graph (UUPSUpgradeable)? I checked and it actually allows _upgradeTo (Which comes from ERC1967UpgradeUpgradeable and actually comes from upper in inheritance). Wondering your thoughts...

Can you add more detail to your question? For example, when you say

Is not clear what are you asking, given that UUPSUpgradeable is not the only contract in the inheritance linearization. Also, what is the script where you run into this issue?

Hello @JulissaDantes . Thank you for the reply! I figured out my way out.

The error I was having was not related to any script but just to compile. The reason I had this was because I was requiring this function to be external as my intend was to inherit this contract on a proxy contract and call the overriding function with an external call but the inherited upgradeTo() function is actually internal.

The way I managed this to work is making this contract abstract and making the overriding function call directly on the proxy and marking it as virtual.