Skip to content

Revert "Use fileURLToPath method"#10

Merged
gentamura merged 1 commit intomainfrom
revert-7-add-schema-path
Oct 20, 2025
Merged

Revert "Use fileURLToPath method"#10
gentamura merged 1 commit intomainfrom
revert-7-add-schema-path

Conversation

@gentamura
Copy link
Member

The regression stems from PR #7 (commit 740a5c0), which changed schemaPath to:

export const schemaPath = fileURLToPath(
  new URL("./schema/index.js", import.meta.url),
);

That line triggers the runtime error under Next.js. To fix it, revert that change and replace it with the safe version:

const schemaUrl = new URL("./schema/index.js", import.meta.url);
export const schemaPath = fileURLToPath(schemaUrl.href);

This ensures fileURLToPath receives a plain string, avoiding the cross‑realm URL issue.

@gentamura gentamura self-assigned this Oct 20, 2025
@gentamura gentamura merged commit cc3fb47 into main Oct 20, 2025
3 checks passed
@gentamura gentamura deleted the revert-7-add-schema-path branch October 20, 2025 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant