Upgradable contract error with Hardhat: "Deployment at address is not registered"

Hi, the forceImport function is indeed what you should use. It can be called from a separate Hardhat script, which does nothing other than calling forceImport for each of the proxies that you have previously deployed. Ensure that you pass an ethers contract factory corresponding to the current implementation contract that is being used by each proxy.

Importing proxies would also import their implementation addresses automatically. For older versions of Hardhat Upgrades, it would also import the admin contract automatically if needed (note the admin field is no longer used as of Hardhat Upgrades v3.0.0 or later).

After you have finished importing, you no longer need the script that calls forceImport -- it can be deleted.