From 95d7234e91392e1ff8feb0ba7e473658e2f3cb2a Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Tue, 4 Jun 2024 16:39:07 +0100 Subject: [PATCH] yarn-plugin: expand error message when package is missing from version manifest Signed-off-by: MT Lewis --- packages/yarn-plugin/src/util.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/yarn-plugin/src/util.ts b/packages/yarn-plugin/src/util.ts index 5d13315327..3ee544289f 100644 --- a/packages/yarn-plugin/src/util.ts +++ b/packages/yarn-plugin/src/util.ts @@ -86,7 +86,14 @@ export const getPackageVersion = async (descriptor: Descriptor) => { ); if (!manifestEntry) { - throw new Error(`Package ${ident} not found in manifest`); + throw new Error( + `Package ${ident} not found in manifest for Backstage v${range.selector}. ` + + `This means the specified package is not included in this Backstage ` + + `release. This may imply the package has been replaced with an alternative - ` + + `please review the documentation for the package. If you need to continue ` + + `using this package, it will be necessary to switch to manually managing its ` + + `version.`, + ); } return manifestEntry.version;