• simp benn
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

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

  • February 29, 2020
  • Like
  • 0