From 9ba577f3dfc0df3ec7d9efce814cdf468b2861a1 Mon Sep 17 00:00:00 2001 From: George H Date: Mon, 15 Apr 2024 16:27:47 +0800 Subject: [PATCH] fix :fix npm start when memory more than 8192 (#48462) Co-authored-by: lijianan <574980606@qq.com> --- scripts/set-node-options.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/set-node-options.ts b/scripts/set-node-options.ts index eecfd624d2..98416e1488 100644 --- a/scripts/set-node-options.ts +++ b/scripts/set-node-options.ts @@ -7,8 +7,8 @@ const totalMemory = Math.floor(os.totalmem() / (1024 * 1024)); if (totalMemory <= 8192) { // setting NODE_OPTIONS process.env.NODE_OPTIONS = '--max-old-space-size=4096'; - // Execute project startup command - const args: string[] = process.argv.slice(2); - - childProcess.execSync(` ${args.join(' ')}`, { stdio: 'inherit' }); } +// Execute project startup command +const args: string[] = process.argv.slice(2); + +childProcess.execSync(` ${args.join(' ')}`, { stdio: 'inherit' });