2

I have a SFDX Force-App that contains all of my classes, lightning web components, objects, triggers, etc. I've uploaded this force-app to my sandbox and my changes in my lwc was there and looked good so now I'm attempting to deploy this force-app to my production environment.

So I followed these steps:

1) I ran

sfdx force:source:convert -P /path/to/source/force-app/MyForceApp/main/default

This outputted a folder like metadataPackage_12345

2) So then I zipped it up with:

zip -r -X JAN-19-2019.zip metadataPackage_12345

3) I then ran a test run via:

sfdx force:mdapi:deploy --checkonly --zipfile JAN-19-2019.zip

This gave me a JobId: 0Af3k00000IwyHETFJ

4) I ran

sfdx force:mdapi:deploy:report

to check the status and it completed successfully.

5) After this finished, I then went to actually deploy it

sfdx force:mdapi:deploy --validateddeployrequestid 0Af3k00000IwyHETFJ  

This also ran and completed successfully.

I then logged into my SF Prod instance and navigated to Set Up > Environments > Deploy > Deployment Status and it shows both the validation and the deployment succeeded.

However, when I go to the location where I have my updated LWC, it doesn't appear to have my changes...

Is there any steps I'm missing to get the LWC to be updated?

4
  • 1
    Can you show source of package JAN-19-2019.zip? I think your created package doesn't going with the lwc Jan 29 '20 at 0:00
  • 1
    Have you tried clearing your cache and trying again?
    – sfdcfox
    Jan 29 '20 at 2:01
  • @EliveltonWalter the LWC was in the zip file as expected.
    – BlondeSwan
    Jan 29 '20 at 15:40
  • @sfdcfox Yes, I tried clearing cache and even opened a new private browser and still no luck
    – BlondeSwan
    Jan 29 '20 at 15:41
2

Others new to LWC and LWC Trailhead: Lightning Web Components Basic may experience OP issue ...

In your VS Code project, in the LWC folder you will have

  • after step 2 Create Lightning Web Components of the Trailhead a LWC named BikeCard.
  • You'll deploy this to your Playground in Step 3 Deploy Lightning Web Conponents
  • In step 4 Handle Events in Lightning Web Components , depending on how you unzip the file Bike Selector App for Trailhead, you will now have an additional LWC called selector as well as the original bikeCard.
  • Note that file bikeCard.js-meta.xml is a LightningComponentBundle, note that file selector.js-meta.xml is also a LightningComponentBundle

When you do an SFDX: Deploy Source to Org, your VS Code project is deployed to your Trailhead Playground.

The instructions for step 4 ask you to create a new one-page one-region Lightning App. The LWC that you need to drag onto the canvas is called selector, not bikeCard! It is easy to get confused and think you updated the bikeCard LWC as the whole trailhead is about bikes. So, you may think your deploy failed or there is some caching issue. But no, you just chose the wrong LWC. Names matter. Good names are best - having bikeCard and selector in the same project was a poor choice by the Trailhead team.

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.