From 029aea2d24168c61959650da974dd0f316644e88 Mon Sep 17 00:00:00 2001 From: phyzical <5182053+phyzical@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:21:23 +0800 Subject: [PATCH] dir ref needs to be a bit more magical --- util/constants.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/constants.js b/util/constants.js index 8ec5097..4ed71a9 100644 --- a/util/constants.js +++ b/util/constants.js @@ -1,4 +1,7 @@ import path from 'path'; +import { fileURLToPath } from 'url'; +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); export default { AUTH: { @@ -54,7 +57,7 @@ export default { YOUTUBE_SEARCH: { // this roughly equates to a max of 30mb MAX_MINUTES: 15, - GENERIC_IMAGE: path.join(process.cwd(), "logo.png"), + GENERIC_IMAGE: path.join(__dirname, "logo.png"), VALID_CONTEXTS: ['itemName', 'albumName', 'artistName'], }, };