3

Can anyone explain this error, that I've got in VS Code recently? When I tried to deploy code to my Org, I got this:

SfdxError: You must specify the Aura bundle folder, not an individual component.

I Googled it, but didn't find anything, that could help.

.xml

manifest

  • you can only deploy the 'Aura Lightning components' that has all files(component, controller, helper, renderer etc). Did you mention any single file name? That must be the reason of this error. You need to mention only the bundle name, ex :MyLightningComponent instead of MyLightningComponent.cmp – Sarang Sep 9 at 9:19
  • OK, so where do I need to mention the bundle name? I didn't change any setting for it. – EviGertsik Sep 9 at 9:23
  • I guess you need to check your package.xml. – Sarang Sep 9 at 9:29
  • I only changed API version in manifest: from 45.0 to 46.0 and that's it. Maybe you can take a look at it and tell me, what sould I change or add to this .xml? – EviGertsik Sep 9 at 9:40
  • Yes please share your package.xml, sfdx command and what else you are doing for this deployment. – Sarang Sep 9 at 9:41
4

Update: The underlying issue has been resolved.

As a background information:

This bug was recently introduced to the VSCode toolbox. Here's a bug report related to this: https://github.com/forcedotcom/salesforcedx-vscode/issues/1635

In order to deploy, right click on the LWC folder in the editor tree and select "SFDX: Deploy Source to Org". Using the deploy on save functionality will fail, since it currently only deploys the single file.

1

When you deploy to org select the master folder and then select deploy source to org don't deploy the single file

enter image description here

  • Previously I made auto-deploy on save in settings, and it worked fine. Yes, it works like you said, but how to resolve my problem, that I can save files, like I used to do before? Without needing to manually select my project folder and deploy it to org? – EviGertsik Sep 9 at 11:26
1

Done! Turns out, reinstalling Salesforce CLI resolves my problem.

0

You can not save individual file but to save the whole component folder That will works

protected by Community Sep 12 at 16:41

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.