From 8b052818fb479df5dc3f86affb1f0e146ac4a8ac Mon Sep 17 00:00:00 2001 From: jderochervlk Date: Mon, 2 Feb 2026 09:01:19 -0500 Subject: [PATCH] fix: wrap binary path resolution with fileURLToPath --- shared/src/findBinary.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/src/findBinary.ts b/shared/src/findBinary.ts index 6c89efecf..090157715 100644 --- a/shared/src/findBinary.ts +++ b/shared/src/findBinary.ts @@ -2,6 +2,7 @@ import * as fs from "fs"; import * as fsAsync from "fs/promises"; import * as path from "path"; import * as semver from "semver"; +import * as url from "url"; export type BinaryName = | "bsc.exe" @@ -115,7 +116,7 @@ export const findBinary = async ({ "..", `@rescript/${target}/bin.js`, ); - const { binPaths } = await import(targetPackagePath); + const { binPaths } = await import(url.fileURLToPath(targetPackagePath)); if (binary === "bsc.exe") { binaryPath = binPaths.bsc_exe;