[SalesForce] Missing Partner Community Licenses in Scratch Org

Is there a way to enable Partner Community User Licenses in scratch org? While trying to deploy Partner Community profiles, we get the following errors.

In field: userLicense – no UserLicense named Partner Community found

I've added Communities and NetworkdEnabled in Scratch Definition file. I still cannot see Partner Community licenses in the Scratch Org.

Read up something on another post related to this, suggesting that if we changed the Edition of the scratch org as "Developer" then those licenses are added by default, however, then we get loads of other errors while deploying.

Any other suggestions/workarounds are welcomed.

Thanks

Best Answer

Use a Developer edition scratch org

{
  "orgName": "My Dev Scratch Org",
  "description": "",
  "language": "en_US",
  "edition": "Developer",
  ....
}

You will get the following licences

|          License Type         | Number of licenses |
|:-----------------------------:|--------------------|
| Customer Community            | 5                  |
| Customer Community Login      | 5                  |
| Customer Community Plus       | 5                  |
| Customer Community Plus Login | 5                  |
| Partner Community             | 5                  |
| Partner Community Login       | 5                  |