From c21b6061209a8053e0c63ce469777cdf59df9c27 Mon Sep 17 00:00:00 2001 From: Craigory Coppola Date: Fri, 25 Apr 2025 13:40:10 -0400 Subject: [PATCH] fix(core): error message when failing to fetch migrations is no good (#30874) ## Current Behavior We error when failing to find a package version via the install step, but meant to warn. Additionally, the warning is hard to see. ## Expected Behavior We don't error when failing to install the package, but the warning is more visible. ## Related Issue(s) Fixes # --- packages/nx/src/command-line/migrate/migrate.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/nx/src/command-line/migrate/migrate.ts b/packages/nx/src/command-line/migrate/migrate.ts index 47dd0b6371..3242f5c54c 100644 --- a/packages/nx/src/command-line/migrate/migrate.ts +++ b/packages/nx/src/command-line/migrate/migrate.ts @@ -1089,9 +1089,11 @@ async function getPackageMigrationsUsingInstall( result = { ...migrations, packageGroup, version: packageJson.version }; } catch (e) { - logger.warn( - `Unable to fetch migrations for ${packageName}@${packageVersion}: ${e.message}` - ); + output.warn({ + title: `Failed to fetch migrations for ${packageName}@${packageVersion}`, + bodyLines: [e.message], + }); + return {}; } finally { await cleanup(); }