2

I am trying to delete an Aura Component by right clicking on the file contents and selecting:

SFDX: Delete This from Project and Org

But it's not working...

I get this message in the output panel:

Starting SFDX: Delete from Project and Org

sfdx force:source:delete --sourcepath c:\path\file.cmp --noprompt

ERROR: The delete operation failed in the org. Review the error messages below, delete any files locally if needed, and re-run the command if applicable.

ERROR running force:source:delete: The delete operation failed in the org. Review the error messages below, delete any files locally if needed, and re-run the command if applicable.

sfdx force:source:delete --sourcepath c:\path\file.cmp --noprompt ended with exit code 1

But there is no error message below to review.

The file is not referenced in any other files. All other related aura files have been deleted, there is only the .cmp and .cmp-meta.xml

Why won't it delete?

2
  • Have you tried manually issuing the command like below sfdx force:source:delete --sourcepath c:\path\file.cmp --noprompt --loglevel=ERROR --json to see if you receive anything . Also have you looked into your orgs deployment status to see if there are any failures Commented Jul 3, 2019 at 20:04
  • is the component added to any other components or lightning page layouts?
    – Ronnie
    Commented Jul 4, 2019 at 5:00

1 Answer 1

1

The CLI sometime can be buggy to show the errors . I had issues last week and got resolved when i updated the CLI using sfdx update

The salesforce deployment status would give much better error . Go to Deploy > Deployment Status in your org when you execute command to see if there are any failures during that .

Also it could be way the vscode extension is issuing the command it might not revealing much error

Manually in your terminal run below

sfdx force:source:delete --sourcepath c:\path\file.cmp --noprompt --loglevel=ERROR --json
1
  • 1
    Running the command as suggested revealed that the file was locked. I restarted VS Code and ran the command again from the terminal and it worked.
    – Robs
    Commented Jul 3, 2019 at 21:23

You must log in to answer this question.

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