I was trying to upload to a Salesforce dev org, a Lightning Web component called "myFirstLwc", and i have this error:
No base file for markup://c:myFirstLWC
I kind of know why. At First "myFirstLWC" was the name of the component. Then i found out a component being used inside another one, needs to be camelCase, so if the name is
myFirstLwc
in the code, it becomes
<c-my-first-lwc />
so in vscode, i renamed the files to be:
myFirstLwc.css
myFirstLwc.html
myFirstLwc.js
myFirstLwc.js-meta.xml
In Metadata, i also corrected:
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="myFirstLwc">
So now i don't have any mention to that "myFirstLWC" string, and i looked in the entire project
After deleting the component in the org, i thought i could now upload it with correct names. But computer says "no":
No base file for markup://c:myFirstLWC
now i'm trying to correct this, with all possible sfdx commands or even workbench, but nothing. I don't know if it should still be here, but:
Those are the other LWC components uploaded before
sfdx won't help me debugging in a dev org:
sfdx force:source:push --loglevel trace
ERROR running force:source:push: This command can only be used on orgs that have source tracking enabled, such as sandboxes and scratch orgs.
I'm now uploading a very minimalist code
myFirstLwc.html
<template>
</template>
myFirstLwc.js
import { LightningElement } from 'lwc';
export default class myFirstLwc extends LightningElement {}
myFirstLwc.js-meta.xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="myFirstLwc">
<apiVersion>52.0</apiVersion>
<isExposed>false</isExposed>
</LightningComponentBundle>