+ Start a Discussion
StephenDicksonStephenDickson 

SFDX: Deploy Source to Org failed to run in VS Code

I have been trying to deploy apex classes to a Trailhead Playgound as well as a developer org, but I receive the error "SFDX: Deploy Source to Org failed to run" in VS Code. 

Did I miss something when I set-up VS Code?
  • Salesforce CLI is up to date
  • All extensions are up to date
  • The orgs in question have been authorized successfully
  • The CLI appears to be installed correctly (when I run "sfdx" in the Terminal, I receive the Salesforce CLI menu)

This is the Salesforce CLI output:
Starting SFDX: Deploy Source to Org
11:35:46.868 sfdx force:source:deploy --sourcepath c:\Salesforce\VSCodeQuickStart\force-app --json --loglevel fatal
11:35:48.630 sfdx force:source:deploy --sourcepath c:\Salesforce\VSCodeQuickStart\force-app --json --loglevel fatal ended with exit code 1

Any help would be much appreciated!
Khan AnasKhan Anas (Salesforce Developers) 
Hi Stephen,

Greetings to you!

The code might have some errors. You can try solving the errors, shown in the error log and then try pushing it again.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
StephenDicksonStephenDickson
Hi Khan, thanks for your reply.  

Unfortunately, VS Code is not detecting any errors.  I simply copied the AccountController class from the Trailhead module (https://trailhead.salesforce.com/en/content/learn/projects/quickstart-vscode-salesforce) and changed the orgName in project-scratch-def.json to "Learning VS Code" as instructed by the Trailhead module.
Lionel Momeni NgaleuLionel Momeni Ngaleu

@StephenDickson,

Where you abale to solve this? I'm also stucked with the same error

Stephen Dickson 10Stephen Dickson 10
Hi Lionel, 

It's been so long that I can't remember.  I think it may have been due to the fact that I didn't have test coverage.  Does that make sense for your situation?

Peace,
Stephen