SFDX Push Error : An object 'ComponentName' of type LightningComponentBundle was named in package.xml, but was not found in zipped directory
Hello,
Nowadays salesforce developers have moved to SFDX and VSCode as their primary IDE. There is one error which has particularly bothered me and my team.
This error occurs when you create a new SFDX project and retrieve all the components, do all the required changes lets say in a lightning web component and try to push the component to salesforce org.
This error occurs :
An object 'ComponentName' of type LightningComponentBundle was named in package.xml, but was not found in zipped directory.
Solution:
Please do check if there is meta.xml file in the component bundle, this error occurs because of missing meta.xml file. For some weird reason, the meta.xml file is not retrieved with the component.
If that is the case, then one solution is to create a meta.xml file manually under the component folder with the general XML configuration as below:
Below is how component bundle should look like:
Another solution will be to create a new component and copy-paste the code from the first component and use the newly created component in the salesforce org. But this is not an optimal solution.
Great post Pritam!! I hope vs code developer should add it as feature in future
ReplyDelete