Repository navigation
Conversation
The asset existence check built a path from new URL(root).pathname, which on Windows yields /C:/Users/... with a leading slash. Every checkout on Windows failed "all local page assets exist" even when the files were present. CI runs on Linux, so the suite looked green. Resolve the URL properly and convert with fileURLToPath instead. The check still fails for a genuinely missing asset, verified both ways.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test-only change. No site content touched.
The bug
all local page assets existbuilt its path with:On Windows
new URL(root).pathnameis/C:/Users/..., with a leading slash, so every path it built was invalid and the test failed on any Windows checkout even though the files were all present. CI runs on Linux, so the suite looked green and the failure only ever showed up locally.The fix
Resolve against the base URL and convert properly:
The
.prefix matters.new URL("/assets/theme.css", root)would resolve against the filesystem root instead of the site directory.joinwas used only on that line, so thenode:pathimport is replaced withnode:url.Verification
npm teston Windows: 10 of 10 pass. It was 9 of 10 before this change, on this same commit ofmain.C:\Users\Owner\kernel-kittens-site\site\assets\theme.css; a real asset returnstrueand a fabricated one returnsfalse, so a genuinely missing asset still fails the build.🤖 Generated with Claude Code
https://claude.ai/code/session_01VcZ4MQ1967Hho27oj8ZkWj