From 9bc4a97f6d668ac2616ec87841986bb552715d69 Mon Sep 17 00:00:00 2001 From: liangchaofei Date: Fri, 14 Jun 2024 15:09:36 +0800 Subject: [PATCH] feat: remove NODE_ENV in npmClient --- packages/utils/src/npmClient.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/utils/src/npmClient.ts b/packages/utils/src/npmClient.ts index 925763209304..b2583120bf76 100644 --- a/packages/utils/src/npmClient.ts +++ b/packages/utils/src/npmClient.ts @@ -58,9 +58,7 @@ export const installWithNpmClient = ({ cwd?: string; }): void => { const { sync } = require('../compiled/cross-spawn'); - // pnpm install will not install devDependencies when NODE_ENV === 'production' - // we should remove NODE_ENV to make sure devDependencies can be installed - const { NODE_ENV: _, ...env } = process.env; + const { ...env } = process.env; const npm = sync(npmClient, [npmClient === 'yarn' ? '' : 'install'], { stdio: 'inherit', cwd,