Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pglite): Fix Windows path resolution #54

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

msfstef
Copy link
Collaborator

@msfstef msfstef commented Mar 26, 2024

Fixes #34

The import.meta.url call resolves to a path that starts with a forward slash, that Windows cannot handle. (see nodejs/node#37845)

Using the Node URL API to resolve a file URL to a path works, but I understand that the PGLite code works across multiple environments so either we need to polyfill this API or write our own implementation of something that works around this issue (like a very ugly regex?)

@msfstef msfstef requested a review from samwillis March 26, 2024 15:10
Copy link
Collaborator

@samwillis samwillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect 👍

@samwillis samwillis merged commit 2221788 into main Mar 27, 2024
@samwillis samwillis deleted the msfstef/fix-windows-path-resolutions branch March 27, 2024 10:45
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.

RuntimeError with NodeJS on Windows
3 participants