I tried to do the trailhead module "Create a Hello World Lightning Web Component" and I followed all the steps but when I do deploy to source to org, it fails. The error which I get is: "DeployFailed: Deploy failed."

It might seem duplicate but I tried all possible answers I found. The API version of my target org is 45.0 and the sfdx extension has also version 45.0. Initially my sfdx cli version was 46.0 and it was throwing api version not found error. I have changed that to version 45.0 using - "sfdx force:config:set apiVersion=45.0 " command . Now I am getting the above mentioned error. No other information is available.

  • Can you run sfdx plugins:install salesforcedx@latest and try once again? Apr 25, 2019 at 5:49
  • Alternatively, you can also try removing sfdx CLI entirely and use a package manager like npm to manage your sfdx-cli installation. I've had to roll back the CLI version twice now to test random issues.
    – tsalb
    Apr 25, 2019 at 7:33
  • What do you get if you type sfdx plugins --core for the main salesforcedx plugin version?
    – pchittum
    Apr 25, 2019 at 22:16
  • @pchittum I get - salesforcedx 45.12.0
    – user905
    Apr 26, 2019 at 0:29
  • @sanketkumar - tried that, doesn't work
    – user905
    Apr 26, 2019 at 0:30

2 Answers 2


Worth a shot: try deploying via the CLI rather than VS Code to get better error messaging. cd to your project directory and run the following command:

sfdx force:source:deploy --sourcepath \force-app

In my case this told me "Can't create lightning component bundle if there is already an aura definition bundle with the same name and namespace." I just had to delete the "helloWorld" aura component and then deploying the LWC worked. Hope this helps!

  • 1
    I received a similarly vague Deploy Failed. DeployFailed [1,1] deploying a class and switched to CLI sfdx force:source:deploy -m ApexClass:classname and got a verbose error message referencing a variable that does not exist Jun 25, 2019 at 19:41

My issue turns out that I already had a lightning component with the same name, i've used this Salesforce Org many time for trailheads. Renamed the existing Aura component and the deployment worked. Was able to see the error using the terminal rather than the right clicking to deploy

You must log in to answer this question.

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