Summary
On a stock Windows machine, fixmap doctor always reports a PROBLEM and exits 1 immediately after a normal npm install --global @aryam/fixmap. The two "multiple binaries" it finds are the standard npm shims (fixmap and fixmap.cmd) generated in the same directory by that single global install — there is nothing stale or competing.
Environment
- fixmap 0.9.0 (installed via
npm install -g @aryam/fixmap)
- Windows (win32), PowerShell 5.1
- Node v24.13.0
Repro
npm install -g @aryam/fixmap
fixmap doctor
echo $LASTEXITCODE # 1
Actual
# FixMap Doctor
- ok Running version: 0.9.0
- ok Resolved from: C:\Users\aryam\AppData\Roaming\npm\node_modules\@aryam\fixmap\dist\doctor.js
- PROBLEM fixmap on PATH: C:\Users\aryam\AppData\Roaming\npm\fixmap; C:\Users\aryam\AppData\Roaming\npm\fixmap.cmd
Multiple FixMap binaries are on PATH. Remove or reorder stale entries so one installation wins consistently.
- ok Project install: none
- ok Global install: 0.9.0 (matches)
- ok Node version: 24.13.0
Fix the problems above; FixMap may otherwise run a different version than you asked for.
Exit code is 1.
The same PROBLEM finding is surfaced through the MCP server's fixmap_doctor tool, so agents see a failing self-diagnostic on every healthy Windows setup.
Expected
One global npm installation should produce an all-ok doctor result (exit 0) on Windows.
Root cause
resolveBinaries() runs where fixmap on win32 (dist/doctor.js, ~line 124):
- A global npm install drops three launchers into one directory:
%APPDATA%\npm\fixmap (sh), fixmap.cmd, and fixmap.ps1.
where fixmap returns both ...\npm\fixmap and ...\npm\fixmap.cmd as separate lines.
- The
new Set(...) de-dup only removes identical strings, so two different filenames from one install survive, binaries.length === 2, and the ok: false branch fires.
So the check counts files instead of installations, and every default npm-on-Windows layout trips it. Following the advice ("Remove or reorder stale entries") would break fixmap invocation from cmd.exe, since removing fixmap.cmd removes the only launcher cmd.exe can execute.
It also means doctor exits nonzero out of the box, so any CI or script that gates on fixmap doctor fails on healthy Windows machines.
Suggested fix
Any of these would work:
- Group
where results by parent directory and treat same-directory .cmd/.ps1/extensionless siblings as one installation.
- Filter out shim extensions that sit next to an extensionless twin before counting.
- Resolve each PATH hit to the underlying
node_modules/@aryam/fixmap package it launches and compare versions instead of counting files — that also catches the real shadowing case doctor cares about, without penalizing the standard Windows layout.
Summary
On a stock Windows machine,
fixmap doctoralways reports a PROBLEM and exits 1 immediately after a normalnpm install --global @aryam/fixmap. The two "multiple binaries" it finds are the standard npm shims (fixmapandfixmap.cmd) generated in the same directory by that single global install — there is nothing stale or competing.Environment
npm install -g @aryam/fixmap)Repro
Actual
Exit code is 1.
The same PROBLEM finding is surfaced through the MCP server's
fixmap_doctortool, so agents see a failing self-diagnostic on every healthy Windows setup.Expected
One global npm installation should produce an all-ok doctor result (exit 0) on Windows.
Root cause
resolveBinaries()runswhere fixmapon win32 (dist/doctor.js, ~line 124):%APPDATA%\npm\fixmap(sh),fixmap.cmd, andfixmap.ps1.where fixmapreturns both...\npm\fixmapand...\npm\fixmap.cmdas separate lines.new Set(...)de-dup only removes identical strings, so two different filenames from one install survive,binaries.length === 2, and theok: falsebranch fires.So the check counts files instead of installations, and every default npm-on-Windows layout trips it. Following the advice ("Remove or reorder stale entries") would break
fixmapinvocation from cmd.exe, since removingfixmap.cmdremoves the only launcher cmd.exe can execute.It also means doctor exits nonzero out of the box, so any CI or script that gates on
fixmap doctorfails on healthy Windows machines.Suggested fix
Any of these would work:
whereresults by parent directory and treat same-directory.cmd/.ps1/extensionless siblings as one installation.node_modules/@aryam/fixmappackage it launches and compare versions instead of counting files — that also catches the real shadowing case doctor cares about, without penalizing the standard Windows layout.