1

I am trying to deploy an application to my developer organization. The Github repo of the application and the command I am using are as below.

Github Repo: https://github.com/trailheadapps/lwc-recipes.git

Command to deploy: (Running from cloned location) sfdx force:source:deploy -p "force-app" --targetusername "myorg" --loglevel INFO --ignorewarnings --verbose

The application was deployed fine when I did initially but later it started failing. I weirdly observed 1 difference in successful and failed deployments that there were 189 components deployed in successful deployments whereas there were 190 components in failed deployments. I do not know where this extra component came from.

Failed Deployment enter image description here

Successful Deployment enter image description here

Currently all the deployments are failing with the below error when I try to deploy with the above command; Component Error: An object 'pubsub' of type LightningComponentBundle was named in package.xml, but was not found in zipped directory

In order to resolve it, I found many solutions available on the internet talks about updating package.xml whereas there is no package.xml available in the application I am trying to deploy.

As I am newbee to the SF, please let me know the reason behind this error and how can I resolve it.

Folders enter image description here Thanks in advance.

6
  • Can you please elaborate on what changes have been made between the initial successful deployment and the later failed deployments? Commented Aug 12, 2021 at 12:50
  • @AdityaNaag I didn't make any change in between successful and failed deployments.
    – Ashwani
    Commented Aug 12, 2021 at 13:16
  • I just took a fresh clone of the recipes repo, and followed the steps in Readme, and I didnt face this issue., which is why I'm curios why it failed. Commented Aug 12, 2021 at 13:19
  • As said above, it also worked for me initially. However are you aware wen do we get such errors. That way we may explore further...
    – Ashwani
    Commented Aug 12, 2021 at 13:22
  • 1
    @AdityaNaag I have uploaded my code here github.com/AshwaniPratap8/my-lwc-recipe.git Please have a look and let me know if you find something.
    – Ashwani
    Commented Aug 12, 2021 at 13:48

2 Answers 2

3

Just delete the pubsub folder from the force-app/main/default/lwc folder and it should work.

I will internally raise and investigate the issue. When I am using the SFDX command sfdx force:source:deploy, I am not seeing any issues because the pubsub folder is excluded in .forceignore. But when I try to use the VS Code extension to deploy, I am getting the exact same error as you are.

1
  • Thanks Aditya! It worked out for me.
    – Ashwani
    Commented Aug 13, 2021 at 3:27
0

I was running into this issue when running the sfdx command sfdx force:source:deploy today. I was able to resolve it by removing the trailing slash and stars from the pubsub entry in .forceignore.

You must log in to answer this question.

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