force:source:deploy fails with single CustomLabel in manifest
See original GitHub issueSummary
Fails to deploy using force:source:deploy
when the package manifest contains a single CustomLabel.
Steps To Reproduce:
- Create a package manifest with single
CustomLabel
,manifest/package.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>FOO_BAR</members>
<name>CustomLabel</members>
</types>
<version>45.0</version>
</Package>
- Add
CustomLabel
to workspace,force-app/main/default/labels/CustomLabels.labels-meta.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<CustomLabels xmlns="http://soap.sforce.com/2006/04/metadata">
<labels>
<fullName>FOO_BAR</fullName>
<language>en_US</language>
<protected>false</protected>
<shortDescription>Foobar label</shortDescription>
<value>FooBar</value>
</labels>
</CustomLabels>
- Deploy
sfdx force:source:deploy -x manifest/package.xml
Expected result
The CustomLabel
should have been deployed to the target org.
This is currently possible with Ant Migration Tool.
Actual result
ERROR: The CustomLabel named FOO_BAR was not found in the workspace.
Additional information
Changing the package manifest to use the CustomLabels
type instead of CustomLabel
works but this is deploying more than I want to push to the sandbox.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>CustomLabels</members>
</types>
<version>45.0</version>
</Package>
SFDX CLI Version: sfdx-cli/6.54.4-c01dcc69db (linux-x64) node-v8.9.4
SFDX plugin Version: @salesforce/plugin-generator 1.0.1 (core) @salesforce/sfdx-trust 2.0.1 (core) builtins 1.0.0 (core) dependencies-cli 1.0.1 salesforcedx 45.3.4 (core)
OS and version: Ubuntu 16.04.5 LTS
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:14 (2 by maintainers)
Top Results From Across the Web
sfdx force:source:deploy complains custom label is not found ...
ERROR: The CustomLabel named API_Only_Profile_Id was not found in the workspace. I confirmed the CustomLabel file exists DrozBook:dx-maintenance ...
Read more >Production Deployment of CustomLabel using VS Code ...
I am using the following command to deploy it. sfdx force:source:deploy --checkonly -x ./manifest/package.xml -u myProdUserName --testlevel ...
Read more >Debugging a failed model training - Rekognition
In the console, Amazon Rekognition Custom Labels shows terminal errors for a model in the Status message column of the projects page. If...
Read more >Metadata API Developer Guide
You can use one of two commands to retrieve metadata components. 1. To retrieve the components specified in your package.xml manifest, issue ......
Read more >Migrating data from one Salesforce organization to another
Run sfdx force:source:deploy -x manifest/package.xml -u username (to which you want to migrate settings). Retrieving metadata (without package.xml).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is what works for me:
to pull from a Sandobx/Org:
to push to a Sandbox/Org:
– not great, not terrible, but it does the job.
This should be fixed by the Dec 12th release of the CLI.