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 test-r0boruzgph0t@example.com -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

  • Can you check in firstLightningWebComonent.js-meta.xml if you have exposed the component and allowed targets – Vishal Sharma May 15 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 May 16 at 6:14
1

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.

| improve this answer | |
  • @ 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 May 16 at 6:13
  • Have you also set the targets that I mentioned? – Navii May 16 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.