From b568eede1bd60d40ac98af3e932253780b90b607 Mon Sep 17 00:00:00 2001 From: Mohsen Fathipour Date: Thu, 8 May 2025 16:11:20 +0330 Subject: [PATCH] fix(php): resolve path import error and ensure ESM compatibility --- resources/js/php.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/php.js b/resources/js/php.js index 39c5335..4e6905d 100644 --- a/resources/js/php.js +++ b/resources/js/php.js @@ -1,7 +1,7 @@ import fs from "fs"; import fs_extra from 'fs-extra'; const { copySync, removeSync, ensureDirSync } = fs_extra; -import { join } from "path"; +import { resolve,join } from "path"; import unzip from "yauzl"; @@ -52,7 +52,7 @@ if (isBuilding) { const phpVersionZip = 'php-' + phpVersion + '.zip'; const binarySrcDir = join(phpBinaryPath, platform.os, platform.arch, phpVersionZip); -const binaryDestDir = join(import.meta.dirname, 'resources/php'); +const binaryDestDir = resolve('./resources/php'); console.log('Binary Source: ', binarySrcDir); console.log('Binary Filename: ', platform.phpBinary);