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

[labs/testing] WTR plugin for SSR does not work in Windows #3165

Closed
augustjk opened this issue Jul 22, 2022 · 0 comments · Fixed by #3175
Closed

[labs/testing] WTR plugin for SSR does not work in Windows #3165

augustjk opened this issue Jul 22, 2022 · 0 comments · Fixed by #3175
Assignees

Comments

@augustjk
Copy link
Member

Which package(s) are affected?

Other/unknown (please mention in description)

Description

For @lit-labs/testing, when utilizing ssrFixture, the server command registered by the WTR plugin resolves the provided relative module paths before sending to the worker thread to be imported before rendering.

const resolvedModules = modules.map((module) =>
pathlib.join(process.cwd(), module)
);

In windows, this creates module paths that begin with "drive:" like c:, causing an error like

Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' 

We should fix it so it's always a proper file URL for all platforms.

Reproduction

TODO

Workaround

Manually patch the plugin code.

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

latest

Browser/OS/Node environment

OS: Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant