Skip to content

Build fails on Windows: inject-tool-templates.js cannot find end marker #13

@rattusrattus

Description

@rattusrattus

Description

The npm run build command fails on Windows during the build:templates step with:

❌ Could not find tool content container markers

Root Cause

The build/inject-tool-templates.js script uses a hardcoded Unix-style line ending pattern (\n) to find the end marker in index.template.html. On Windows, files may have CRLF (\r\n) line endings, causing the pattern match to fail.

Environment

  • OS: Windows 10/11
  • Shell: Git Bash / PowerShell / CMD
  • Node.js: v20+

Steps to Reproduce

  1. Clone the repo on Windows
  2. Run npm install
  3. Run npm run build
  4. Build fails at build:templates step

Suggested Fix

Add fallback pattern matching for Windows line endings while preserving the original Unix behavior. I've prepared a PR with a backwards-compatible fix.

Workaround

Users can manually convert index.template.html to Unix line endings using:

dos2unix index.template.html

But a proper fix in the build script would be preferable for cross-platform compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions