I have been working on some classes using VS code and SFDX. I created a scratch org and pushed code to it using:

sfdx force:source:push -u MY_ORG_ALIAS

The push was successful.

I continued development and I happen to miss a semicolon in code. I hit the push command but this time instead of throwing a compilation issue DX thew this:

ERROR running force:source:push: Push failed.

I have been working on DX for months now and I have always seen a compilation error message and never this.

I then ran this sfdx force:source:push -u MY_ORG_ALIAS --dev-debug

This was the output of the command: enter image description here

Has something changed with DX? Am I missing something here?

  • 1
    Could you update your CLI with sfdx update command and try again, otherwise, from command line call push with --json flag.
    – Raul
    Commented Jun 28, 2019 at 6:18
  • @Raul I had updated the CLI but didn't try the json flag which seems to be giving the error message, so that worked just fine! Thank you!
    – d_k
    Commented Jun 28, 2019 at 6:23

2 Answers 2


The push and deploy were broken in a version of CLI 10 days ago, although its fixed in latest sfdx cli version; some of us still face the issue.

If updating sfdx CLI with sfdx command does not resolves the issue, workaround is to :

  1. Add --json flag to the push command, it usually displays all errors in JSON format.
  2. Monitor deployments from Salesforce setup (this could be annoying as you have to leave your editor to see the error).

To get a proper resolution, please log an issue with salesforcedx-vscode team on github, they are quite active and doing a great job with fixes.


I get this error occasionally because I have a filter setup in VSCode to hide the XML metadata files. Therefore if I delete an Apex class file in VSCode just using the standard file Delete command, only the CLS file will be deleted and not the corresponding XML file. When you PUSH you will get an error saying the CLS file is missing, which of course it is. So you need to delete the XML file as well and then Salesforce will no longer expect it as part of the manifest and will perform the delete server side as well.

You must log in to answer this question.

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