[SalesForce] Not available for deploy for this organization

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?

Best Answer

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.