I have been trying to deploy a lightning web component and an apex class to a developer org, but I receive the error "SFDX: Deploy Source to Org failed to run" in VS Code.

Did I miss something when I set-up VS Code?

  1. Salesforce CLI is up to date
  2. All extensions are up to date
  3. The orgs in question have been authorized successfully

I was able to deploy the "datatableStudentController" apex class successfully so I assume the connection with VS code and my org is fine, not sure why "datatableRecords.html", "datatableRecords.js" and "datatableRecords.js-meta.xml" won't get deployed. Screenshots of my codes are given below:

enter image description here

enter image description here

enter image description here

enter image description here

  • Try using right click to lwc folder and deploy or use command line manually to see the deploy. I had seen similar error and was able to work with folder-right click> deploy
    – Ysr Shk
    Feb 25 at 9:46
  • Can you check Problems tab to see if there any message there? Usually when it says Deploy Errors without any message on Output tab, error message appears in Problems tab.
    – tugce
    Feb 25 at 10:13
  • @YsrShk - It still didn't work.
    – Night Guy
    Feb 25 at 11:25
  • what error did you receive, when you attempted with CLI approach
    – Ysr Shk
    Feb 27 at 16:16

1 Answer 1


Javascript is case sensitive. In your LWC controller the variable is defined as dataTable, however in component if:true it shows datatable. Also in lightning-datatable data attribute should have curl braces like shown below instead of double quotes.

<template if:true={dataTable}>

<lightning-datatable data={dataTable} columns={columns}.....

In LWC controller

export default class AccountList extends LightningElement {
    columns = columns;
  • Thank you for pointing those out. I have corrected those but still I cannot deploy it. The same error message is coming up and there are no messages in the Problem tab at that time.
    – Night Guy
    Feb 25 at 11:23
  • I added the columns part as well. Also do you have Salesforce Extension Pack (Expanded) installed in your visual studio code? It does have extra plugins for Javascript and LWC that might help you flag the problem.
    – tugce
    Feb 25 at 11:41
  • Yes I have the extension packs installed but for some reason it is not getting deployed.
    – Night Guy
    Feb 25 at 12:05

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.