diff --git a/src/sfProject.ts b/src/sfProject.ts index 4a992aedc1..eef96e9213 100644 --- a/src/sfProject.ts +++ b/src/sfProject.ts @@ -684,7 +684,9 @@ export class SfProject { */ public getDefaultPackage(): NamedPackageDir { if (!this.hasPackages()) { - throw new SfError('The sfdx-project.json does not have any packageDirectories defined.'); + throw new SfError('The sfdx-project.json does not have any packageDirectories defined.', 'NoPackageDirectories', [ + `Check ${this.getPath()} for packageDirectories.`, + ]); } const defaultPackage = this.findPackage((packageDir) => packageDir.default === true); return defaultPackage ?? this.getPackageDirectories()[0];