From 1b38f997524458b6d1a71725330639f2c66192c6 Mon Sep 17 00:00:00 2001 From: KaizIqbal <24286590+KaizIqbal@users.noreply.github.com> Date: Tue, 28 Jul 2020 10:07:22 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20NODE=5FENV=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index a6ed8e9..5e60cc0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,8 +17,11 @@ const frameNumber = (number: number, length: number) => { // --------------------------- Main (async () => { const browser = await puppeteer.launch({ - ignoreDefaultArgs: process.env.IS_LOCAL ? [" --single-process "] : [], - executablePath: process.env.IS_LOCAL ? "/usr/bin/google-chrome-stable" : "", + ignoreDefaultArgs: [" --single-process ", "--no-sandbox"], + executablePath: + process.env.NODE_ENV == "development" + ? "/usr/bin/google-chrome-stable" + : "", headless: true, });