function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
FilikinFilikin 

How to build a sfdx package which references the npsp - what goes into sfdx-project.json?

Hi,
I am using the sfdx force:package:version:create command to attempt to create the first version of my package.
But the source code includes a reference to npsp, so I am getting an error "No such column 'npe01__SYSTEMIsIndividual__c' on entity 'Account'"

I understand that I have to add a dependency to the npsp in my sfdx-project.json file, but can someone give me an example of what to add?
thanks
Best Answer chosen by Filikin
FilikinFilikin
Figured this one out - in sfdx-project.json, in the dependencies section of packageDirectories I included "subscriberPackageVersionId": "04t80000001AWvwAAG" where the 04t string is the id of the Contacts and Organisaton package, which I obtained by running 
sfdx force:package:installed:list 
I also had to create a dummy Account record type, so that record types got switched on
So my sfdx-project.json file now looks like this:
{
"packageDirectories": [
{
"path": "force-app",
"default": true,
"package": "MyPackage",
"versionName": "ver 1.5",
"versionNumber": "1.5.0.1",
"dependencies": [
{
"subscriberPackageVersionId": "04t80000001AWvwAAG"
}
]
}
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "43.0",
"packageAliases": {
"MyPackage": "0Ho1W000000XXXXX",
"MyPackage@1.0.0-1": "04t1W000000XXXXXX",
}
}