You need to sign in to do that
Don't have an account?
Not able to deploy LWC Code to my org
Not able to deploy LWC Code to my org.
Here is the code :
JS:
import { LightningElement,track } from 'lwc';
export default class HelloExpression extends LightningElement {
@track greeting="Hello";
changeHandler(event){
this.greeting=event.target.value;
}
}
HTML:
<template>
<lightning-card title="HelloWorld" icon-name="custom:custom14">
<div class="slds-m-around_medium">
<p>Hello, {greeting}!</p>
<lightning-input label="Name" value={greeting} onchange={changeHandler}></lightning-input>
</div>
</lightning-card>
</template>
MetaHTML:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="helloWorld">
<apiVersion>45.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
</targets>
</LightningComponentBundle>
The JS is being saved, HTML is being saved in VS code however the MetaHTML is not being saved and it throws the below error:
Error parsing file: LWC Metadata Xml Parser: ParseError at [row,col]:[1,7]
Message: The processing instruction target matching "[xX][mM][lL]" is not allowed.
Any help? Please.?
All Answers
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>45.0</apiVersion>
<isExposed>True</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
</targets>
</LightningComponentBundle>