1

I have Lightning Web Components called list. And when I try to do SFDX: Retrieve Source from Org, To get my classes from Apex class. I get the following error:

20:32:09.428 Starting SFDX: Retrieve Source from Org === Retrieve Warnings FULL NAME TYPE MESSAGE
───────── ──────────────────────── ────────────────────────────────────────────────────────────────────── list LightningComponentBundle Entity of type 'LightningComponentBundle' named 'list' cannot be found 20:32:10.344 ended SFDX: Retrieve Source from Org

I need help, Thanks!

Miriam F.
  • 21
  • 1
  • 7

3 Answers3

1

I created a new project with the command:

SFDX: Create Project with Manifest

Then, I right-clicked on the package.xml file in the manifest folder, and selected:

SFDX: Retrieve Source in Manefist from Org

This worked.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
Miriam F.
  • 21
  • 1
  • 7
0

(not a real answer but too long for a comment)

What's the exact command you're running to fetch it. If the command you run doesn't explicitly mention username/alias - check what happens when you open the default org (sfdx force:org:open) - by using default org you might be connecting to wrong org and the component really isn't there.

Maybe "list" is a reserved keyword?

Can you definitely see the component in the org. Setup -> Lightning Components contains it? When you open the developer console, query (tick the "Tooling API" checkbox at the bottom!) and run

SELECT Id, FilePath, Format, Source 
FROM LightningComponentResource
ORDER BY FilePath

Is the component in there somewhere? https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_lightningcomponentresource.htm

Do you have other tools available like Ant + Migration tool or even Workbench. You should be able to run a full metadata retrieve with package.xml similar to

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>LightningComponentBundle</name>
    </types>
    <version>52.0</version>
</Package>
eyescream
  • 18,088
  • 2
  • 34
  • 46
-1

In your question there might be possible these issues:

1- When you authorize your org with VS code then might be possible your org is different and when you retrieve that is different.

2- When you deploy your code after that can be possible you delete that file, then this error can be shown.

I hope you find the above solution helpful. If it does, please mark it as the Best Answer to help others too.

Thanks and Regards, Suraj Tripathi