function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AJAYAJAY 

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.?

Best Answer chosen by AJAY
AJAYAJAY
somehow it worked. Thanks . LWC is strange .

All Answers

Naveen KNNaveen KN
can you try this 

<?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>
simp bennsimp benn
Nice post and thanks for sharing this to us. Free amazon gift card generator provides you with those gift card codes that you can redeem and buy your favourite products. https://techfries.co/amazon-gift-card-generator/
AJAYAJAY
somehow it worked. Thanks . LWC is strange .
This was selected as the best answer