1

Try to deploy project on new scratch org

sf project deploy start --ignore-conflicts --source-dir=./force-app --async --json

And get unclear deployment error.

    "details": {
      "componentFailures": [
        {
          "changed": false,
          "componentType": "",
          "created": false,
          "createdDate": "2023-10-30T19:15:18.000Z",
          "deleted": false,
          "fileName": "package.xml",
          "fullName": "parent",
          "problem": "An object 'parent' of type LightningComponentBundle was named in package.xml, but was not found in zipped directory",
          "problemType": "Error",
          "success": false
        },
        {
          "changed": false,
          "componentType": "",
          "created": false,
          "createdDate": "2023-10-30T19:15:18.000Z",
          "deleted": false,
          "fileName": "package.xml",
          "fullName": "child",
          "problem": "An object 'child' of type LightningComponentBundle was named in package.xml, but was not found in zipped directory",
          "problemType": "Error",
          "success": false
        }
      ]

There are no components with these api names in the project.

5
  • What version (sf version) of sf? You should find the generated "package.xml" under another name in the directory [User]\.sf\manifestCache. Can you see <members>child</members> above the <name>LightningComponentBundle</name> in this file? Commented Oct 31, 2023 at 9:55
  • latest available, il checked generated manifest in cache folder and there are no any entrance parent or child anywhere
    – Siarhei
    Commented Nov 1, 2023 at 11:59
  • The error was due to the fact that the folder force-app/main/default/lwc contained two empty folders without any files force-app/main/default/lwc/parent and force-app/main/default/lwc/child
    – Siarhei
    Commented Nov 1, 2023 at 12:02
  • You should add this as an answer to your own question - you can! This would facilitate things for people that come later with a similar question :-) (Do you know BTW where these empty folders came from? They weren't generated by Salesforce tools, were they?!) Commented Nov 1, 2023 at 12:07
  • Those folders stayed after deleted or stashed components. Who knows for what reason and how folder structure validated during deployment i believe it is done on org side? And looks like error message is also wrong, should be something like zip contains folders/files that are not listed as metadata in manifest
    – Siarhei
    Commented Nov 1, 2023 at 12:14

1 Answer 1

1

The error was due to the fact that the folder force-app/main/default/lwc contained two empty folders without any files force-app/main/default/lwc/parent and force-app/main/default/lwc/child. Looks like it is sf cli issue, after i deleted those empty folders deployment goes fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .