+ Start a Discussion
Ravi_SFDCRavi_SFDC 

Salesforce DX Issue

I am working on the Visual Studio Code IDE with Salesforce DX. 

1. Successfully created a package sfdx force:source:convert --outputdir mdapi_output_dir --packagename managed_pkg_name

2. Now I am trying to deploy in the needed ORG with this command
sfdx force:mdapi:deploy --deploydir mdapi_output_dir --targetusername me@example.com

getting the below errors

Error  mdapi_output_dir/package.xml  package.xml  You cannot install or upgrade a package that has a NetworkBranding component. remove 
components of NetworkBranding type from the package.


Error  mdapi_output_dir/package.xml  package.xml  You cannot install or upgrade a package that has a Network component. Remove
components of Network type from the package.


Error  mdapi_output_dir/package.xml  package.xml  You cannot install or upgrade a package that has a SiteDotCom component. Remove
components of SiteDotCom type from the package.


Error  mdapi_output_dir/package.xml  package.xml  You cannot install or upgrade a package that has a CustomSite component. Remove
components of CustomSite type from the package.


But I want to deploy my package along with NetworkBranding, Network,  SiteDotCom, and CustomSite.

Your help would be really appreciated.
 
 
Ben Uphoff 4Ben Uphoff 4
I'm experiencing the same SFDX deployment error, so far with only the error about CustomSite. Please advise, y'all - thanks!
MarkDenfordMarkDenford
I've got the same issue. Ravi and Ben, did either of you find a solution?
MarkDenfordMarkDenford
if anyone comes across this in the future I finally figured out the problem in my case, my package.xml had a <fullName>blah blah blah</fullName> tag, when that was included it threw all these errors, deleting it worked
Breslyn Jacobus 14Breslyn Jacobus 14

I upvoted MarkDeford's answer, but I'm also going to lend some clarity here (since I landed on Mark's answer a few times before I actually realized what he meant).

I'm using Change Sets to build package.xml files. When you use the Workbench to download the .zip file of these change sets, the package.xml file outputs the FullName and the Description of the Change Set itself, right at the top of the package.xml file. 
 

<?xml version="1.0" encoding="UTF-8"?><Package xmlns="http://soap.sforce.com/2006/04/metadata">
     <fullName>MyChangeSetFullName</fullName>
     <description>MyChangeSetDescription</description>
     <types>
        <members>MyApexClass1</members>
        <members>MyApexClass2</members>
        <name>ApexClass</name>
     </types>
     <version>49.0</version>
</Package>

In order to resolve the error that reads, "package.xml -- Error: You cannot install or upgrade a package that has a * component. Remove components of * type from the package.", simply remove the line 2: <fullName>MyChangeSetFullName</fullName, and line 3: <description>MyChangeSetDescription</description>, from the above package.xml.