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
Answer plzAnswer plz 

Lightning web component is not visible in community page

I am trying to upload a custom component on the community site page, but it's not visible on the community site.
​​​​​​Can anyone help me to solve this issue. 

Thanks in advance
Best Answer chosen by Answer plz
Akshay Dhiman 63Akshay Dhiman 63
Hi,
I would suggest you to check your js-meta.xml file once and make sure that you have added the needed target in it. XML file will be like this:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle >
    <apiVersion>51.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>
</LightningComponentBundle>
Hope this explanation will resolve your query. Mark it as the best answer if you find it helpful.
Thanks
Akshay

All Answers

AbhinavAbhinav (Salesforce Developers) 
Hi User1234,

Could you please check meta file of lwc component, whether this target has been added there or not.
 
<targets>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
  </targets>

Please mark this answer as best answer if it helps so that others facing simlar issue will find it useful.

Thanks!

 
ravi soniravi soni
Hi User1234,
Make sure that you have add following into your lwc xml file.
<targets>
        <target>lightningCommunity__Default</target>
        <target>lightningCommunity__Page</target>   
        </targets>

Keep mind one thing that  <isExposed>true</isExposed> it must be true.
let me know if it helps you and marking it as best answer.
Thank you
 
Akshay Dhiman 63Akshay Dhiman 63
Hi,
I would suggest you to check your js-meta.xml file once and make sure that you have added the needed target in it. XML file will be like this:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle >
    <apiVersion>51.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>
</LightningComponentBundle>
Hope this explanation will resolve your query. Mark it as the best answer if you find it helpful.
Thanks
Akshay
This was selected as the best answer
Elijah KingsleyElijah Kingsley
I faced the same problem when I wanted to set up web components for my site. I created a site where premium logo design bundles are collected and you can always go to https://masterbundles.com/graphics/logos/ to get professional logos designed by expert artists. I was able to fix the error when I checked the js-meta.xml file and realized that I added the wrong target. Thanks a lot, you helped me solve this problem.