+ Start a Discussion

No base file for markup LWC

User-added image

I am getting the above error when trying to push to scratch org. Can some one point out the error please?
Raj VakatiRaj Vakati
Looks like you are using the <c-learn> markup in the code .. please check once in web components 

Bao Nguyen 30Bao Nguyen 30
Hi guys,

I got the same error like that and later found out that all component files have to have the exact same name as the project folder. I got the error when SF requires the folder name to start with a lower case so I changed it without changing the component files' name. Give it a try to see if it helps.

I've done as Bao suggested, and also tried deploying just the default lwc generated with the sfdx commands.  Also tested on my mac and windows machine.  Same problem.  I'm really stuck here.  Any other suggestions would be appreciated!
Rahul Kumar DeyRahul Kumar Dey
I got the same error while I'm try to deploy source code,, Can anyone have solution for it??
Arvind Thakur 24Arvind Thakur 24

We need to specify the -meta.xml file along with the LWC file else we would receive some error related to component not found

I had the same issue today, where I changed something in my HTML and tried to deploy just the HTML file. Figured it out eventually.


Please mark the question as resolved to help other.

LWC Deployment issue

vaibhav jadhav 35vaibhav jadhav 35
Try changing the name of the component.
Hello Ohana,
I also found similar issue in my vs code.
Pls try this Solution: My components have same name as of the folder in which they are contained.

But It worked when I changed the VS CODE Project Folder Name as it had same name as of  component folder name ,then it got deployed easily.
for Ex: lwc_recipes(VS code folder name) ->forceapp->main->lwc->lwc_recipes(where lwc component resides with same name as of folder) ~for this error will occur

lwc_recipes_oss(VS code folder name) ->forceapp->main->lwc->lwc_recipes(where lwc component resides with same name as of folder) ~This pattern will work and the components will get deployed to the org.

I faced the same error fought with it for few days and finally resolved now with your post here.
Thanks Asmit
Ankit Aggarwal 100Ankit Aggarwal 100
It must be happening as you might have changed the component name. And it is also case sensitive. I have renamed the file and it resolved the issue.