Skip to content

Commit bb850df

Browse files
committed
Fix getting path for weak-node-api on Windows
1 parent 93dcbcb commit bb850df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/ferric/src/cargo.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import assert from "node:assert/strict";
22
import cp from "node:child_process";
33
import fs from "node:fs";
44
import path from "node:path";
5+
import { fileURLToPath } from "node:url";
56

67
import { spawn } from "bufout";
78
import chalk from "chalk";
@@ -14,9 +15,9 @@ import {
1415
isAppleTarget,
1516
} from "./targets.js";
1617

17-
const WEAK_NODE_API_PATH = new URL(
18+
const WEAK_NODE_API_PATH = fileURLToPath(
1819
import.meta.resolve("react-native-node-api/weak-node-api")
19-
).pathname;
20+
);
2021

2122
const APPLE_XCFRAMEWORK_CHILDS_PER_TARGET: Record<AppleTargetName, string> = {
2223
"aarch64-apple-darwin": "macos-arm64_x86_64", // Universal

0 commit comments

Comments
 (0)