From e305ecf57194be332845a7461070ebab69e69436 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Wed, 20 Apr 2022 17:59:16 +0200 Subject: [PATCH] Improve #ec2bf1a95d6c45c093f68df832bc6bcbdd372a5a --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index b4511a853..cd0df2f9d 100644 --- a/index.js +++ b/index.js @@ -47,7 +47,7 @@ async function build(reason) { rimraf.sync('dist'); const env = {...process.env}; const _600mb = 629145600; - if (_600mb > os.totalmem()) { + if (_600mb > os.totalmem() && !env.NODE_OPTIONS) { // Prevent OOM on tsc compile for system with low memory // https://github.com/Koenkk/zigbee2mqtt/issues/12034 env.NODE_OPTIONS = '--max_old_space_size=256';