diff --git a/src/commands/fix/pnpm-fix.mts b/src/commands/fix/pnpm-fix.mts index a4ffe2b1c..3b8b437c8 100644 --- a/src/commands/fix/pnpm-fix.mts +++ b/src/commands/fix/pnpm-fix.mts @@ -315,6 +315,10 @@ export async function pnpmFix( // actualTree may not be defined on the first iteration of pkgJsonPathsLoop. if (!actualTree) { + if (!isCi) { + // eslint-disable-next-line no-await-in-loop + await removeNodeModules(cwd) + } const maybeActualTree = isCi && existsSync(path.join(rootPath, 'node_modules')) ? // eslint-disable-next-line no-await-in-loop