From 4364ad213e36f6ad82abae9cc1e57b32b5d1a33c Mon Sep 17 00:00:00 2001 From: Haim Knokh Date: Tue, 13 Aug 2024 15:33:26 +0300 Subject: [PATCH] fix: fixed 'parse is not a function' error --- src/modules/components/api_engines/bulkApiV2_0Engine.ts | 4 ++-- src/modules/components/common_components/common.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/components/api_engines/bulkApiV2_0Engine.ts b/src/modules/components/api_engines/bulkApiV2_0Engine.ts index 5b646067e..317858f3a 100644 --- a/src/modules/components/api_engines/bulkApiV2_0Engine.ts +++ b/src/modules/components/api_engines/bulkApiV2_0Engine.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - -import * as parse2 from 'csv-parse/lib/sync'; +const parse2 = require('csv-parse/lib/sync'); +//import * as parse2 from 'csv-parse/lib/sync'; import { ApiEngineBase, diff --git a/src/modules/components/common_components/common.ts b/src/modules/components/common_components/common.ts index 0fef3994e..0e12adf6b 100644 --- a/src/modules/components/common_components/common.ts +++ b/src/modules/components/common_components/common.ts @@ -8,7 +8,8 @@ import { Buffer } from 'buffer'; import { execSync } from 'child_process'; -import * as parse2 from 'csv-parse/lib/sync'; +//import * as parse2 from 'csv-parse/sync'; +const parse2 = require('csv-parse/lib/sync'); import * as fs from 'fs'; import * as glob2 from 'glob'; import * as path from 'path';