Skip to content

Windows: doubled drive letter in logs directory path causes ENOENT #14

@mtmattei

Description

@mtmattei

Bug

On Windows, the MCP server crashes on startup with:

Error: ENOENT: no such file or directory, mkdir 'C:\C:\Users\<user>\AppData\Local\npm-cache\_npx\...\node_modules\@instawp\mcp-wp\logs'

Notice the doubled C:\C:\ — the logs directory path is being constructed by prepending the drive letter to an already-absolute path.

Environment

  • OS: Windows 11
  • Node.js: v22.20.0
  • Package: @instawp/mcp-wp (latest via npx -y)

Steps to Reproduce

  1. On Windows, run npx -y @instawp/mcp-wp (with valid env vars set)
  2. Server crashes immediately with the ENOENT error above

Root Cause

Likely in build/wordpress.js:60 — the mkdir call constructs a path that doubles the drive letter prefix. This is a common issue when using path.join() or string concatenation with an already-absolute Windows path.

Workaround

Manually creating the directory at the (incorrect) doubled path allows the server to start, but this shouldn't be necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions