Skip to content

fix: Windows ESM import for start script - #26

Open
janeinari wants to merge 1 commit into
joeynyc:mainfrom
janeinari:fix/windows-start-import
Open

fix: Windows ESM import for start script#26
janeinari wants to merge 1 commit into
joeynyc:mainfrom
janeinari:fix/windows-start-import

Conversation

@janeinari

Copy link
Copy Markdown

Summary

  • Convert the production server path with pathToFileURL before dynamic import() in scripts/start.mjs.
  • Fixes npm start on Windows where absolute paths like E:\... are not valid ESM module specifiers (the drive letter is treated as a URL scheme).

Test plan

  • On Windows 11: run the start path after build and confirm the server loads
  • On macOS/Linux: confirm start still works (file URLs are valid there too)

Dynamic import() rejects absolute Windows paths (drive letters look like
URL schemes). Convert with pathToFileURL so npm start works on Windows 11.
@janeinari

janeinari commented Jul 29, 2026

Copy link
Copy Markdown
Author

Local npm run verify on Windows 11 fails 9 tests for platform reasons (POSIX mode bits, spawn('npm') vs npm.cmd, spawning .mjs as GROK_BIN, path separator in workspace watcher). Unrelated to the pathToFileURL start fix. Happy to help with Windows test hardening in a follow-up if useful...

image

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