diff --git a/code/lib/cli/src/automigrate/fixes/angular-builders-multiproject.ts b/code/lib/cli/src/automigrate/fixes/angular-builders-multiproject.ts index 1c543f1a5504..229f3aaf9394 100644 --- a/code/lib/cli/src/automigrate/fixes/angular-builders-multiproject.ts +++ b/code/lib/cli/src/automigrate/fixes/angular-builders-multiproject.ts @@ -19,7 +19,7 @@ export const angularBuildersMultiproject: Fix = { // Skip in case of NX if ( !angularVersion || - (await isNxProject(packageManager)) || + (await isNxProject()) || framewworkPackageName !== '@storybook/angular' ) { return null; diff --git a/code/lib/cli/src/detect.ts b/code/lib/cli/src/detect.ts index 4fa86cdc280d..c1b9317bc556 100644 --- a/code/lib/cli/src/detect.ts +++ b/code/lib/cli/src/detect.ts @@ -212,7 +212,7 @@ export async function detect( return ProjectType.UNDETECTED; } - if (await isNxProject(packageManager)) { + if (await isNxProject()) { return ProjectType.NX; } diff --git a/code/lib/cli/src/helpers.ts b/code/lib/cli/src/helpers.ts index b72e625ad716..db5cfb34d1ac 100644 --- a/code/lib/cli/src/helpers.ts +++ b/code/lib/cli/src/helpers.ts @@ -300,7 +300,6 @@ export function getStorybookVersionSpecifier(packageJson: PackageJsonWithDepsAnd return allDeps[storybookPackage]; } -export async function isNxProject(packageManager: JsPackageManager) { - const nxVersion = await packageManager.getPackageVersion('nx'); - return !!nxVersion ?? findUp.sync('nx.json'); +export async function isNxProject() { + return findUp.sync('nx.json'); }