From ef09762fdc8f6aa03c39063c5dc29aa958211a75 Mon Sep 17 00:00:00 2001 From: Essem Date: Sat, 29 Jan 2022 16:14:27 -0600 Subject: [PATCH] how and why did I miss this --- utils/services/image.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/services/image.js b/utils/services/image.js index 63a0a07..6fa277b 100644 --- a/utils/services/image.js +++ b/utils/services/image.js @@ -4,10 +4,11 @@ import fs from "fs"; import path from "path"; import { fileURLToPath } from "url"; import { Worker } from "worker_threads"; +import { createRequire } from "module"; // only requiring this to work around an issue regarding worker threads const nodeRequire = createRequire(import.meta.url); -nodeRequire(`./build/${process.env.DEBUG && process.env.DEBUG === "true" ? "Debug" : "Release"}/image.node`); +nodeRequire(`../../build/${process.env.DEBUG && process.env.DEBUG === "true" ? "Debug" : "Release"}/image.node`); import ImageConnection from "../imageConnection.js";