diff --git a/helpers.js b/helpers.js index 5b7dda2..babe412 100644 --- a/helpers.js +++ b/helpers.js @@ -10,6 +10,7 @@ import {buildWordPress} from "./platforms/wordpress/wordpress-adapter.js"; import {buildHubspotEmail} from "./platforms/hubspot/hubspot-email-adapter.js"; import {buildHubspotPage} from "./platforms/hubspot/hubspot-page-adapter.js"; import fs from "fs/promises"; +import {constants} from "fs"; import fetch from "node-fetch"; import mime from "mime-types"; @@ -29,7 +30,7 @@ export async function readJSONFile(jsonFile) { let data = {}; try { - await fs.access(jsonFile, fs.constants.F_OK | fs.constants.R_OK); + await fs.access(jsonFile, constants.F_OK | constants.R_OK); data = await fsExtra.readJson(jsonFile); } catch (e) { return {