3

I know this question has been asked before, but I have tried the solutions given and they have not worked, so I'm going to ask as well.

I'm doing a Trailhead with Lightning Web Components, setting up ebikes. I have put in all the code that was given and ran it and verified it worked in Salesforce. I have pushed the code and I have logged into the Dev Hub. But when I try to deploy the code, I get the following:

enter image description here

I know that in other posts versions of Salesforce DX plugins have been mentioned as the culprit. I do know this: the code that I cloned from Github had version 46.0 in all of its js-meta.xml files. My plugin was 45.0, but I updated it to 46.0. The Trailhead had me create a component called bikeCard and paste in the code needed. The js-meta.xml was at 45.0. I changed it to 46.0. I have searched the code and no other 45.0 is to be found in the context of apiversion. Also, I have verified that my permissions include API enabled and Modify all Data. I don't know what else it could be. Any help?

  • 1
    From the error it seems to be having a dependency on communities, you may need to enable it on dev or scratch org before doing a push. – Raul Jun 18 '19 at 17:29
  • having the same thoughts as Raul - does your definition file looks like the one in the trailhead repo here: github.com/trailheadapps/ebikes-lwc/blob/master/config/… ? – Renji-xD Jun 18 '19 at 17:32
5

With the exception of the 2nd error, for Case.Product__c, this is all due to not having Communities enabled in the org you are deploying to. If this is a Developer Edition org, then in the Setup UI, search for Communities Settings and click the Enable communities checkbox, and then enter a domain for your community and save. Once the registration process is complete, you should be able to push the source into the org. I think you could probably do the same to enable Communities in a TH Playground, but am not certain.

You'll also need to delete the Case.Product__c field that ships with Developer orgs, or give it a different API name so that the field in the repo will deploy. I'm not sure about that CaseComment error at the bottom - see if it gets resolved by enabling Communities.

The issue is that the formerly separate Communities version of the ebikes demo app has been archived and merged into the main repository, but the Trailhead module instructions haven't caught up with that yet.

EDIT 2: So, I actually walked through the process of deploying the app to a Dev org, and there are a few more gotchas. I've submitted a pull request to the main repo which has now been accepted, and so Dev Org installation instructions are now there.

  • It's the username you use to log in interactively to the org. So Setup > Users will show it. Or sfdx force:org:list. Also, I didn't add it yet, but you need to change the license from "Site Guest User" to "Guest" in metadataapi/unpackaged/profiles/Ebikes Profile.xml (I may not have that path exactly right, on phone atm) – Thomas Taylor Jun 19 '19 at 13:32
  • Okay, I changed <userLicense>Guest user License</userLicense> to <userLicense>Guest</userLicense>. Both before and after that change, when I try to deploy I get the following error: In field: siteAdmin - no User named test-yofedq1671ah@example.com found. I didn't use that name in the site admin field. I used the david.ta@brave-panda-aa0011.com. Do you know why I would get that error? – David Tarvin Jun 19 '19 at 13:40
  • Hmm - double check you saved the Site XML file and didn't change git branches or anything? – Thomas Taylor Jun 19 '19 at 13:43
  • File was saved and I didn't change git branches except where you said on your fork to checkout devOrg – David Tarvin Jun 19 '19 at 13:44
  • Actually, I just figured out I edited the wrong file. I edited E_Bikes_C.site-meta.xml instead of E_Bikes.site-meta.xml. – David Tarvin Jun 19 '19 at 13:47

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.