When running sf package convert to convert a first-generation (1GP) managed package to a second-generation (2GP) package, the conversion fails if the 1GP package references metadata from a 2GP base package installed in the same packaging org (a "1GP-extends-2GP" scenario).
You may encounter one or more of the following errors during conversion:
1) An error occurred while trying to install a package dependency:
CustomField(<Object__c>.<Field__c>) referenceTo value of '<namespace>__<Object>__c'
does not resolve to a valid sObject type
2) An error occurred while trying to install a package dependency:
CustomField(<Object__c>.<Field__c>) The global picklist cannot be resolved
The 1GP package upload process uses a "spidering" algorithm to detect dependencies and record them in package.xml. This algorithm cannot detect 2GP packages as dependencies. As a result, when sf package convert runs, the 2GP base package is never recorded as a dependency and is never installed into the conversion build environment. Any metadata in the 1GP package that references the 2GP base package cannot be resolved, causing the conversion to fail.
Install a 2GP base package into a 1GP packaging org.
Create a 1GP package in that org whose metadata references the 2GP base package's metadata (for example, a custom field referencing a custom object or global picklist from the 2GP base package).
Upload a version of the 1GP extension package.
Run sf package convert against the 1GP package version.
The conversion fails with one of the errors listed above.
There is currently no workaround for this issue. The conversion engine has no way to add additional dependencies beyond what was captured by the 1GP upload process.
There is no official mandate or deadline for 1GP to 2GP package conversion, and no fixed end-of-support date for 1GP packages at this time. Customers blocked by this issue are not at risk of any compliance deadline.
A fix is planned for a future Salesforce release. This article will be updated when the fix becomes available.
005386874

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.