FlowDefinition isn’t supported in the Salesforce CLI for API version 44.0 and later

Let's fix an error related to flows and deployment.

Encountered this error, googled and landed here?

Well, you are not alone. I also faced the same fate.

Just by the looks of it, the error looks very scary. But actually the solution is very simple.

When you try to deploy flows using VSCode to one of your orgs or sandboxes starting version 44.0 you don't have to specify the <activeFlowVersion></activeFlowVersion>

To support CI/CD development practice, flow names no longer include the version number when pushing or pulling via the Salesforce CLI.

If a deployment is initiated with flow definitions, the active version number of the flow in the flow definition overrides the flow’s status field.

So the solution is to remove the  <activeFlowVersion></activeFlowVersion> and deploy it back.

Let me know if this was helpful!