From 05c5697bc28e49a1c97ced2189f7d9998ea8b33c Mon Sep 17 00:00:00 2001 From: Roman Axelrod Date: Mon, 14 Aug 2023 16:11:21 +0300 Subject: [PATCH] Fit the devTool to nodejs v16. --- helpers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {