+ Start a Discussion

Salesforce DX - create a scratch org with npsp

I am working with an org which has the NPSP and a few other packages installed.
Using the "old" development cycle, I created a sandbox from the org, made my changes in eclipse and pushed the changes to production.
Now I want to use scratch orgs.
So I created a scratch org, used my package.xlm file from Eclipse to retrieve the config from the sandbox, converted it to the new format and attempted to push it to the scratch org.
However the config is dependent on fields that are part of the NPSP, so do I have to install all the packages that are in the sandbox manually into the scratch org before I can start development?
This seems to break the idea of a fast turnround - am I missing something?
Best Answer chosen by Filikin
James LoghryJames Loghry
Hi there,

Here's a thread on Salesforce Stackexchange on the same topic: https://salesforce.stackexchange.com/questions/185840/how-to-install-managed-package-using-salesforce-dx-cli.

Long story short, you'll want to find the Id of the package version you're needing to install and then use the following command:
sfdx force:package:install -i <id>  -u <your scratch org alias>