question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

force:source:deploy fails with single CustomLabel in manifest

See original GitHub issue

Summary

Fails to deploy using force:source:deploy when the package manifest contains a single CustomLabel.

Steps To Reproduce:

  1. 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>
  1. 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>
  1. 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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
ikopylcommented, Sep 9, 2019

Here is what works for me:

to pull from a Sandobx/Org:

  <types>
    <members>AcmeLabel</members>
    <members>BetaLabel</members>
    <name>CustomLabel</members>
  </types>

to push to a Sandbox/Org:

  <types>
    <members>*</members>
    <name>CustomLabels</members>
  </types>

– not great, not terrible, but it does the job.

2reactions
zerkzcommented, Dec 16, 2019

This should be fixed by the Dec 12th release of the CLI.

image

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found