From 534b24b8519adbeea2442bd4679633ecbe138e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Wed, 8 May 2024 19:55:26 +0200 Subject: [PATCH] fix(core): set yarn berry nodeLinker correctly in migrate command (#23249) ## Current Behavior ## Expected Behavior ## Related Issue(s) Fixes #23222 (cherry picked from commit 2460c89047c9f176ae18e20a5e0a3ad5f474ebab) --- packages/nx/src/command-line/migrate/command-object.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nx/src/command-line/migrate/command-object.ts b/packages/nx/src/command-line/migrate/command-object.ts index 9b033def1b24d..785771c516eec 100644 --- a/packages/nx/src/command-line/migrate/command-object.ts +++ b/packages/nx/src/command-line/migrate/command-object.ts @@ -155,8 +155,8 @@ function nxCliPath() { }); // if it's berry ensure we set the node_linker to node-modules if (packageManager === 'yarn' && pmc.ciInstall.includes('immutable')) { - execSync(pmc.preInstall, { - cwd: 'yarn config set nodeLinker node-modules', + execSync('yarn config set nodeLinker node-modules', { + cwd: tmpDir, stdio: ['ignore', 'ignore', 'ignore'], }); }