function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
team tejateam teja 

SFDX: Deploy Source to Org failed to run


I tried so many times authorize fine but deploy is not working 
User-added image
Suraj Tripathi 47Suraj Tripathi 47
Hi,

First please update your salesforce CLI.

Your sfdx-project.json file should be like this 
{
  "packageDirectories": [
    {
      "path": "force-app",
      "default": true
    }
  ],
  "namespace": "",
  "sfdcLoginUrl": "https://login.salesforce.com",   
  "sourceApiVersion": "45.0"
}

///////////
sfdcLoginUrl  : https://test.salesforce.com (if you are deploying to sandbox).

Your  XML file must contain:-

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="helloWorld">
  <apiVersion>51.0</apiVersion>
  <isExposed>true</isExposed>
  <targets>
    <target>lightning__AppPage</target>
    <target>lightning__RecordPage</target>
    <target>lightning__HomePage</target>
  </targets>
</LightningComponentBundle>



Please mark it as Best Answer if it helps you.

Thanks & Regards
Suraj Tripathi


 
ravi soniravi soni
Hi Teja,
You should update Salesforce CLI.

How to update Salesforce CLI
1. ) Go to this link=>  https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm
2.)
Under Install the CLI on Windows section. click on Download.
3.)
chose CLI according your window. if your window is 64 bit then select 64 bits and if your window 32bit then you will have to select 86 bits CLI.

let me know it it helps you and In case if you will face any problam then ask again
I will help you. and if this help you, marking it as best answer.
Thank you

 
AbhinavAbhinav (Salesforce Developers) 
Hi,

If you can share the error details than it will be more appropriate  for community  to help.

Thanks!
Scott Williams 95Scott Williams 95
I was having this problem - I checked the Deployment Status page in the Org, and my overall test coverage was short, so it wouldn't deploy. Is there a way to specify what tests to run? Several of the classes I want to delete have zero test coverage and if I can just get rid of those, I may be back up to par, though I still have a couple of tests that need updating. 
Chris AuerChris Auer
For me the issue was test was failing. And I found the failing test by looking at the Deployment Status page (/lightning/setup/DeployStatus/home)
Mitchell Young 17Mitchell Young 17

Just try to Retrive once. and Deploy work fine then for me.