1

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? – sanket kumar Apr 25 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 at 7:33
  • What do you get if you type sfdx plugins --core for the main salesforcedx plugin version? – pchittum Apr 25 at 22:16
  • @pchittum I get - salesforcedx 45.12.0 – user905 Apr 26 at 0:29
  • @sanketkumar - tried that, doesn't work – user905 Apr 26 at 0:30
1

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 – bullcitydave Jun 25 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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