Node Modules packages requiring conflicting version of openzeppelin import

Hi, my dApp uses openzeppelin version "^4.0.0".
We are trying to integrate @opengsn v2, which requires openzeppelin version "3.1.0-solc-0.7".

When I try to compile the code, this error throws:
Error HH404: File @openzeppelin/contracts/utils/cryptography/draft-EIP712.sol, imported from contracts/ERC721Permit.sol, not found.

The issue is in the node modules, where one version of openzeppelin overrides the other, rendering some contracts imports broken.

:1234: Code to reproduce

  1. create a smart contract with compiler version ^0.8.0 that imports @openzeppelin/contracts/utils/cryptography/draft-EIP712.sol

  2. also use the opengsn v2 (which imports the openzeppelin SafeMath library that is no longer needed with Solidity compiler version ^0.8.0).

Try to compile your code and see errors pertaining to conflicting node module package imports.

:computer: Environment

I'm using HardHat version 2.9.2 and Solidity compiler version ^0.8.0

Thank you!

What OpenGSN package are you installing? They seem to use OpenZeppelin Contracts 4.x.

Thank you for getting back to me.
They pushed code to eliminate the need for SafeMath and use OpenZeppelin Contracts 4.x. within the last 48 hours. So my issues is resolved.