6

Lately, using the Deploy feature from SFDX, components are taking a painfully long time to deploy to the org. This is happening even when deploying a single component.

Has anyone else run into this issue? Any steps to investigate, or remedy this issue? It's absolutely ridiculous that it takes this long to deploy just a few lines of code.

11:42:36.368 sfdx force:source:deploy --sourcepath /lwc/component/component.html --json --loglevel fatal

11:55:10.569 sfdx force:source:deploy --sourcepath /lwc/component/component.html --json --loglevel fatal ended with exit code 1

2
  • Is this in a high-traffic org? You can't deploy something while something else is being deployed. Make sure you're developing in your own org (sandbox or scratch org). I've never seen a deployment of a single file take more than a few seconds (perhaps 20 seconds or so).
    – sfdcfox
    Mar 23, 2020 at 16:45
  • 1
    I don't think I've ever seen a 10 minute deployment, but I have seen deployments lag quite significantly for no apparent reason. Doe the issue replicate across orgs on different pods? If you create several orgs, you'll likely see them distribute across a couple of pods that you can check.
    – David Reed
    Mar 23, 2020 at 17:24

3 Answers 3

1

This problem is probably already solved, I write this answer for the next ones who like me will come across it.

In my case it was a mistake on my part. I renamed my class and in particular the following file :

myclass.cls-meta.xml to myclass.xml

Of course VS doesn't like that very much ... However, it does not return any error and continues to load in a loop.

if you change to the folowing it work (well, in my case anyway) :

myclass.xml to myclass.cls-meta.xml

0

All I did was restarted VScode and deployed the folder using

sfdx force:source:deploy --sourcepath c:\Users\MyClassPath and boom!

It got deployed in 3 seconds.

0

I think for me it was basically making sure in the VSCode Folder, if you have an Apex Class (abc.cls), you also need to have a meta XML file.
(e.g abc.cls-meta.xml.). As mentioned above, you need to have exactly the same name as the actual class with the'-meta'. appended.

I also noticed that in the VSCode Folder "Manifest" - the Package XML was the wrong API version to the version in the abc.cls-meta.xml e.g 56.0

so keep those to the same version

You must log in to answer this question.

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