4

I am trying to deploy a lightning web component to the org using vs-code but getting the error.

Starting SFDX: Deploy Source to Org

10:09:14.43 sfdx force:source:deploy --sourcepath d:\Aakriti\Projects\LWC\LWCLearning\force-app\main\default\lwc --json --loglevel fatal
10:09:25.813 sfdx force:source:deploy --sourcepath d:\Aakriti\Projects\LWC\LWCLearning\force-app\main\default\lwc --json --loglevel fatal ended with exit code 1

Earlier I was able to deploy components successfully but after updating vs-code, I am getting this error. I am not sure what is the issue. Can anyone please let me know how can I resolve this.

I am using api-version '45'.

Thanks.

  • 1
    Can you check if the error message is limited to What you have posted in your question? Check if you are getting anything else? – sanket kumar Apr 12 at 5:23
  • I am also getting this issue, but the file actually still deploys itself successfully – Brian Miller Apr 12 at 6:22
  • @sanketkumar, No I am not getting anything else. It is not specifying the exact error message. – Aakriti.G Apr 15 at 6:38
  • @BrianMiller, No my component is not getting deployed with this error. – Aakriti.G Apr 17 at 11:16
  • I am having same issue. When using vs code there is no package.xml. Am i right? – vanessen May 11 at 18:00
3

I was also facing the same error but did not find anything here. If your deployment is failing, so you need to go to your developer org, setup --> Deployment Settings

Here you will find the error details. Mine was failing coz I had already one lightning component by "HelloWorld", so I had to delete it.

You might face some other error here. So please check and then try.

  • thank you, with your help I can at least see the actual error. BTW it is Setup > Deployment Status and not Deployment Settings. – SFDC Dev 27 Jul 24 at 20:59
0

Does your package.xml have the following?

<types>
    <members>*</members>
    <name>LightningComponentBundle</name>
</types>
  • its AuraDefinitionBundle not LightningComponentBundle. Link – rahul gawale May 23 at 11:33
0

Try the execute the command from Terminal window of VS Code, by putting 'trace' log level. Generally, you can copy the command from the output window. Eg.

sfdx force:source:deploy --sourcepath "c:\Users\Ross\Documents\Personal Practice Orgs\gungunaDev\force-app\main\default\lwc\customPathUiLwc" --json --loglevel trace

On the terminal window, after running the command you get the detailed errors. In my case, I was having a different name for my folder and my Component files.

I got the message as below. Which said that you 'Cannot find Lightning Component Bundle'. After looking at the error I realized that somehow I changed the name of the folder but not the files.

enter image description here

0

If you created a new Project, you will get error because one TrailHead Playground have only 1 project. You can create new TrailHead Playground and use this account to authorize to Org, you will not get error.

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.