diff --git a/packages/foundry-sdk-generator/src/generate/betaClient/generatePackage.ts b/packages/foundry-sdk-generator/src/generate/betaClient/generatePackage.ts index 30a3496cb..31877e005 100644 --- a/packages/foundry-sdk-generator/src/generate/betaClient/generatePackage.ts +++ b/packages/foundry-sdk-generator/src/generate/betaClient/generatePackage.ts @@ -109,7 +109,7 @@ export async function generatePackage( const { findUp } = await import("find-up"); const nodeModulesPath = await findUp("node_modules", { - cwd: dirname(fileURLToPath(import.meta.url)), + cwd: __dirname, type: "directory", }); @@ -174,7 +174,7 @@ async function getDependencyVersion(dependency: string): Promise { } const { findUp } = await import("find-up"); const result = await findUp("package.json", { - cwd: dirname(fileURLToPath(import.meta.url)), + cwd: __dirname, }); const packageJson = await readFile(result!, { encoding: "utf-8", diff --git a/packages/foundry-sdk-generator/src/generate/generateBundles.ts b/packages/foundry-sdk-generator/src/generate/generateBundles.ts index ece7dd898..c8c1df53f 100644 --- a/packages/foundry-sdk-generator/src/generate/generateBundles.ts +++ b/packages/foundry-sdk-generator/src/generate/generateBundles.ts @@ -30,7 +30,7 @@ async function createRollupBuild( const { findUp } = await import("find-up"); const nodeModulesPath = await findUp("node_modules", { - cwd: dirname(fileURLToPath(import.meta.url)), + cwd: __dirname, type: "directory", });