Package based approach is easier since the handcrafting package XML can be error-prone.
You can run the command sfdx force:source:retrieve -n MyPackageName to retrieve everything in your package in DX Source format without having to go through unzipping of file or conversion from one format to another. Here MyPackageName is the package name, you will need to ...
Yes, fundamentally, that's the start of the process for moving from Developer Edition-based development to scratch org-based development. Either (1) or (2) works fine; they're basically equivalent so it comes down to what you find easier (I generally find 2 easier).
Once you've pulled down the metadata you need (and converted it to Salesforce DX format), you'...
I was also running into this issue. I tried logging out and logging back into the org, as well as updating SFDX, uninstalling and reinstalling. None of these resolved the issue. Finally, when I tried to do a force:source:push to another org, I got an error indicating that .sfdx/stash.json had invalid json in it, and sure enough it had an extra "}" ...
There is a metadata setting for it documented here
For the opportunity Scoring to work it involves installing the Sales Insights Managed package.
At this point, this is not Source Tracked so scratch org settings will fail.
You can automate by first installing the package after scratch org creation
sfdx force:package:install -p 04t58000000SGw3
And then ...
sfdx force:org:create -s -f -a -d
The command you are trying to give is incomplete
-f is a key which will expect the value as a file path to the definition file
-d is a key it will expect a value for how many days you need to keep the scratch org
-a will be the alias for the org you will be creating
It's odd. I tried to do a simpler repo and couldn't reproduce the problem.
Under the ideal situation a SFDX force:source:push will only create the connected app with the first push. Any subsequent push commands will ignore it.
However, something is occurring that causes SFDX to try and push it again. In that case the underlying metadata deploy fails with the ...
You can't retrieve and push this metadata; these are standard fields. You must turn on the StateAndCountryPicklist feature in your scratch org definition file: