1

I am unable to deploy/push the LWC to Devhub/scratch org. I'm getting error "The component must implement at least one of lightning__HomePage interface".

I have already added the "lightning__HomePage" tag in the js-meta.xml file. Still, I'm getting the same error message.

This is happening when my org is upgraded to Summer 19.

Please help me to resolve this issue.

Thanks in advance.

helloworld.js-meta.xml

<?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__HomePage</target>
    <target>lightning__AppPage</target>
    <target>lightning__RecordPage</target>
</targets>    
</LightningComponentBundle>

helloworld.html

<template>
<div>
    HelloWorld
</div>
</template>

helloworld.js

import { LightningElement } from 'lwc';

export default class ConfigureScreen extends LightningElement {}
3
  • Do you have a Spring ‘19 Org, and does it work there fine?
    – Jayant Das
    Commented Apr 21, 2019 at 20:04
  • It seems that you’re still using the spring 19 api version. For that reason I don’t think that it’ll have something to do with the summer 19 upgrade... Commented Apr 21, 2019 at 23:56
  • I'm facing this issue on the Summer 19 Org. Code deployment is working fine on older Spring 19 Org. My observation: I'm unable to deploy the LWC code if it is added to the record page. If I removed the component from the record page, I 'm able to deploy the code. Commented Apr 22, 2019 at 5:55

2 Answers 2

2

I had added the component in lightning app page. I removed it from the page, then I was able to save the Lwc. After saving I again added it to the lightning app page from the builder. It is working.

If you have added the component in any of the home pages, please remove it temporarily and try to save. You can add it back, once you save it.

1

I am also facing the same issue. I noticed a pattern in this: If you have a component and getting used on any layout or Utility bar. Then you will face this issue.

Workaround: 1. Create a wrapper component and call your above component in this wrapper component. 2. Using this you will never be working on the wrapper component directly. As soon as the error got fixed use your component on the layout.

You must log in to answer this question.

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