How to fix INVALID_TYPE in Salesforce deployments
A metadata component, or a type it references, is not valid or enabled in the target org.
Surfaces during: metadata deploy validation, before any DML or test runsWhat it means
INVALID_TYPE means the target org rejected a metadata component because its type, or a type it depends on, is not supported there. This usually traces back to an org feature or license that is not enabled in the target, an API version mismatch, or a standard object or field that does not exist in that org's edition.
It's most common when promoting metadata from a feature-rich production org, or a full sandbox copy of one, into a scratch org or Developer Edition sandbox whose feature set and licenses were never configured to match.
Common causes
The fix
- Confirm the feature is enabledCheck that the target org has the same feature or license, Person Accounts, Multi-Currency, or similar, turned on as the source.
- Align the API versionMatch the metadata's API version in package.xml to a version the target org fully supports.
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <members>*</members> <name>CustomObject</name> </types> <version>62.0</version> </Package> - Verify edition compatibilityConfirm the target org's Salesforce edition includes the standard object or field the component depends on.
How Serpent prevents this
Serpent AI compares source and target org capabilities before scoping a task, so an edition or feature gap shows up as a warning instead of a failed deploy. See the Salesforce deployment error library.

Prevention
Related errors
INVALID_TYPE, answered
Start free. No credit card, no install, no commitment.
Set up in under 15 minutes. No DevOps hire needed.
