+ Start a Discussion
Devon MorancieDevon Morancie 

no base file for markup

Hi all, so I am getting the error "No base file for markup" while trying to do the LWC trailhead. I have seen that all LWC need to have the same name as the folder containing them, and named accordingly, but I am still getting the same error. I tried typing out the components and also copying/pasting the code from the trailhead, and still getting the same error. Here's the component code..
<div>Name: {name}</div>
<div>Description: {description}</div>
<lightning-badge label={material}></lightning-badge>
<lightning-badge label={category}></lightning-badge>
<div>Price: {price}</div>
<div><img src={pictureUrl}/></div>
The JS code...
import { LightningElement } from 'lwc';
export default class BikeCard extends LightningElement {
name = 'Electra X4';
description = 'A sweet bike built for comfort.';
category = 'Mountain';
material = 'Steel';
price = '$2,700';
pictureUrl = 'https://s3-us-west-1.amazonaws.com/sfdc-demo/ebikes/electrax4.jpg';
And the config code...
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
User-added image
did it deployed successfully to your org? and on which step your are getting this error ?
Devon MorancieDevon Morancie
@Piyush no it will not deploy to the org, that is where I am getting the error.
I'm receiving the same error.  Can't deploy even the simplest of components all of the sudden. I found a couple other open questions about this error online, but none seem to offer a solution [Links below].  To be sure, I verified that my project folder and components all have the same name (pretty simple name, just "pm").

Did you ever find a solution to this?


Devon MorancieDevon Morancie
@awicz Sorry for the late reply. I never found a solution, so I threw out the Salesforce instructions for creating a project and just used the tried and true method of "Create project with manifest" then it worked.
@Devon.  No worries, and thanks for the response.  I gave the "create project with manifest" a try, and ended up with the same error.  I must be missing something really simple, but I just can't figure this one out.  Frustrating.  

Anyway, if it is ever sorted out, I'll post back here in case some other poor soul is stuck where I am.
Nancy EverestNancy Everest
All my filenames were the same as the enclosing component folder just above it, so that wasn't my problem.

But what I discovered was that the component name cannot be the same name as the vs code project folder name. When I changed the name of my project folder outside of vs code and reopened the folder in vs code, deploying then worked. See if that works for you.
Victor GarcésVictor Garcés
Thanks, that works for me!