1

I have created Lightning Web component through SFDC CLI using VC code editor, No while successfully pushing my changes to Scratch org.I am not seeing my LWC under Custome tabs in Lightning App Builder. this is my success msg.

.html file

<template>
    <h1> Welcome to My Web Store KingLion Sports Apparel and Accessories </h1>
 </template>

.js file

import { LightningElement } from 'lwc';

export default class FirstLightningWebComonent extends LightningElement {}

.xml file

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>48.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__AppPage</target>
    </targets>
</LightningComponentBundle>
PS C:\Users\city\LWC tutorial\force-app\main\default\lwc> sfdx force:source:push -u [email protected] -w33
Job ID | 0Af0p00000JMT68CAH
SOURCE PROGRESS | ████████████████████████████████████████ | 1/1 Components
=== Pushed Source
STATE  FULL NAME                                                 TYPE                      PROJECT PATH
─────  ────────────────────────────────────────────────────────  ────────────────────────  ──────────────────────────────────────────────────────────────────────────────────────────
Add    firstLightningWebComonent\firstLightningWebComonent.html  LightningComponentBundle  force-app\main\default\lwc\firstLightningWebComonent\firstLightningWebComonent.html
Add    firstLightningWebComonent\firstLightningWebComonent.js    LightningComponentBundle  force-app\main\default\lwc\firstLightningWebComonent\firstLightningWebComonent.js
Add    firstLightningWebComonent\firstLightningWebComonent.js    LightningComponentBundle  force-app\main\default\lwc\firstLightningWebComonent\firstLightningWebComonent.js-meta.xml

This is the screen shot for LIghtning App Builder

enter image description here

3
  • Can you check in firstLightningWebComonent.js-meta.xml if you have exposed the component and allowed targets Commented May 15, 2020 at 9:45
  • I am not sure what you are saying .Though trying t oexplain here tag<isExposed> is set to true already and there is no error while pushing LWC component .its not visible in my Lightnign App builder
    – AM_SFDC
    Commented May 16, 2020 at 6:14
  • you have to indivisually push all the files ie (.html,.js,.xml) or you can simply save (ctrl +s) all files..
    – Upendra
    Commented Sep 9, 2020 at 10:40

1 Answer 1

3

Please be sure if you have set the targets in the xml file. If not then please check below:

  1. Change :

    <isExposed>false</isExposed>
    

    to:

    <isExposed>true</isExposed>
    
  2. And also add:

    <targets>
         <target>lightning__AppPage</target>
         <target>lightning__HomePage</target>
         <target>lightning__RecordPage</target>
    </targets>
    

in parallel to isExposed tag. As you are using the lwc for app page so setting only first target would work.

2
  • @ Navi - <is Exposed> tag is already set to true .,I am getting msg of succesful but not seeing LWC component in Lightning app builder
    – AM_SFDC
    Commented May 16, 2020 at 6:13
  • 1
    Have you also set the targets that I mentioned?
    – Navii
    Commented May 16, 2020 at 8:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .