From 9542f7c5294498fde2d762bbc6a12555c46badaf Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 23 Jun 2023 11:35:37 +0200 Subject: [PATCH] Hide ModuleNotFound error in pnpm pnp mode --- code/lib/cli/src/js-package-manager/PNPMProxy.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/lib/cli/src/js-package-manager/PNPMProxy.ts b/code/lib/cli/src/js-package-manager/PNPMProxy.ts index 4ddaeb6fcda3..d435ec397a05 100644 --- a/code/lib/cli/src/js-package-manager/PNPMProxy.ts +++ b/code/lib/cli/src/js-package-manager/PNPMProxy.ts @@ -135,7 +135,9 @@ export class PNPMProxy extends JsPackageManager { return packageJSON; } catch (error) { - console.error('Error while fetching package version in PNPM PnP mode:', error); + if (error.code !== 'MODULE_NOT_FOUND') { + console.error('Error while fetching package version in PNPM PnP mode:', error); + } return null; } }