Visual Studio Code – LWC Deployment Error for Single file
This issue due to visual studio recent upgrade, so to overcome either downgrade your version or select the Lightning Web Component OR Aura Component Folder from left side instead of the single file.
For Example:
Proposal is a LWC Bundle with contain Proposal.html, Proposal.js and proposal.js-meta.xml
Select the Proposal Folder instead of deploying the single file
SfdxError: You must specify the Aura bundle folder, not an individual component.

This also impacts Lightning aura and breaks the convenient ‘AutoSave on focus change’, ‘deploy on save’ .

VS Code Version: 1.38.0

SFDX CLI Version: 7.23.1-ced0ec4940

Solution:

  • Downgrading to version 7.8 of the sfdx-cli works fine. Upgrading to 7.23 and you have the error.
  • Use to deploy from LWC Folder (From left side source)

Written by 

I am Sakthivel Madesh, a certified Salesforce Advanced Developer & Administrator working on Salesforce Technology since 2011. I am currently working in Techforce Services as Sr. Salesforce Developer. I have worked on multiple technologies Like PHP, Java, Salesforce, I am very passionate about Salesforce and to earn 15x Salesforce Certification. I love Trailhead for learning Salesforce Skill and Become a Trailhead 5x Ranger too. I Love to Learn & Share my Salesforce knowledge to Salesforce Learners/Beginner using My Blog and Salesforce Community.

Leave a Reply

Your email address will not be published. Required fields are marked *

*