Skip to content

Windows compatibility: process.env.HOME undefined + Unix socket not supported #5

@NeKoOuO

Description

@NeKoOuO

Environment

  • OS: Windows 11
  • Node.js: v24.13.1

Issues Found

Bug 1: \process.env.HOME\ is undefined on Windows

In both \src/client.js\ and \src/daemon.js:

\\js
const WALKIE_DIR = process.env.WALKIE_DIR || path.join(process.env.HOME, '.walkie')
\\

On Windows, \process.env.HOME\ is \undefined\ — the correct variable is \USERPROFILE. Node.js v24 throws a \TypeError [ERR_INVALID_ARG_TYPE]\ when \path.join\ receives \undefined.

Fix:
\\js
const WALKIE_DIR = process.env.WALKIE_DIR || path.join(process.env.HOME || process.env.USERPROFILE, '.walkie')
\\

Bug 2: Unix domain socket not supported on Windows

\\js
const SOCKET_PATH = path.join(WALKIE_DIR, 'daemon.sock')
\\

Windows does not support Unix domain sockets (the .sock\ file approach). The daemon starts but the client cannot connect, resulting in:

\
Error: Failed to start walkie daemon. Check ~/.walkie/daemon.log for details
\\

Suggested fix: Use a TCP loopback port (e.g. \127.0.0.1:random_port) or Windows named pipes (\\.\pipe\walkie-daemon) as fallback when \process.platform === 'win32'.

Steps to Reproduce

\\�ash
npm install -g walkie-sh
walkie create test-channel -s secret
\\

Immediately crashes with \ERR_INVALID_ARG_TYPE\ on Node.js v24, or daemon connect error after applying the HOME fix.

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