santifer/career-ops · critical · Error
tracker-parse.mjs: cannot load tracker-aliases.json (${e.mes
Error message
tracker-parse.mjs: cannot load tracker-aliases.json (${e.message}). The file ships with career-ops next to tracker-parse.mjs — restore it from the repo or re-run: node update-system.mjs apply What it means
At module load time, tracker-parse.mjs reads tracker-aliases.json (a SYSTEM/BOOTSTRAP file shipped alongside the module) and JSON.parse's it into HEADER_ALIASES. If the file is missing or corrupt, it throws an Error telling the user this is a broken install and to restore the file or re-run `node update-system.mjs apply`. This is deliberately fail-fast: a silent fallback would reintroduce header-alias drift across readers.
Source
Thrown at tracker-parse.mjs:40
/**
* Header text (lowercased) → canonical field name. Includes ES aliases.
* Loaded from tracker-aliases.json — the ONE shared alias table, which the web
* read path (web/src/lib/tracker-table.mjs) also loads at runtime, so the two
* can never drift (PR #1598 review). Add new aliases in the JSON, not here.
*
* A missing or corrupt JSON is a broken install (the file ships alongside this
* module in SYSTEM_PATHS/BOOTSTRAP_PATHS): fail fast with an actionable
* message rather than degrading silently — a quiet fallback here would
* reintroduce exactly the reader drift the shared table exists to prevent.
* (The web loader degrades to the legacy fixed order instead because it reads
* the file from a user-configured root at request time.)
*/
export const HEADER_ALIASES = (() => {
const src = new URL('./tracker-aliases.json', import.meta.url);
try {
return JSON.parse(readFileSync(src, 'utf-8'));
} catch (e) {
throw new Error(
`tracker-parse.mjs: cannot load tracker-aliases.json (${e.message}). ` +
'The file ships with career-ops next to tracker-parse.mjs — restore it ' +
'from the repo or re-run: node update-system.mjs apply',
);
}
})();
/**
* A score cell in the tracker: `N/5` or `N.N/5` (any precision), or the
* sentinels `N/A` / `DUP` / `—` (em dash) / `-` (hyphen). Markdown bold is
* stripped first. `—`/`-` mirror the tracker's own "no data" convention used
* in every other column (Report, PDF, etc.) — see #1799: a backfilled entry
* with no evaluation (e.g. a rejection for a role never run through
* `oferta`) needs a score-cell sentinel too, not just `N/A`. A status label
* never matches this, which is what makes it a reliable discriminator between
* the score and status columns regardless of their order (#1427).
*/
export const SCORE_CELL_RE = /^\d+(?:\.\d+)?\/5$/;View on GitHub (pinned to 9b17a8ac97)
Solutions
- Restore the install: node update-system.mjs apply.
- Re-clone or re-pull the repo to get the original tracker-aliases.json.
- Validate the file: node -e "JSON.parse(require('fs').readFileSync('tracker-aliases.json','utf8'))" and fix syntax errors.
- If a custom install location, ensure tracker-aliases.json sits next to tracker-parse.mjs.
Example fix
# the error is an install-integrity failure — no code fix, run: node update-system.mjs apply # or restore from git: git checkout HEAD -- tracker-aliases.json
Defensive patterns
Strategy: validation
Validate before calling
function trackerAliasesInstalled() {
const p = new URL('./tracker-aliases.json', import.meta.url);
try {
JSON.parse(readFileSync(p, 'utf-8'));
return true;
} catch { return false; }
}
if (!trackerAliasesInstalled()) {
console.error('Run: node update-system.mjs apply');
process.exit(1);
} Prevention
- Run node update-system.mjs apply after pulling updates to keep system files intact.
- Add a CI check that asserts tracker-aliases.json is present and valid JSON.
- Never hand-edit or move tracker-aliases.json out of the module directory.
When it happens
Trigger: tracker-aliases.json is absent from the module directory (deleted, never copied, or a partial update left it out); the file exists but contains invalid JSON (truncated, encoding issue, hand-edit corruption).
Common situations: A career-ops update (update-system.mjs) was interrupted leaving the install partial; a user manually edited or deleted tracker-aliases.json; a git operation removed the file; file-system corruption or a sync tool (Dropbox) truncated the file.
Related errors
- Could not parse existing candidates file at ${candidatesPath
- Existing candidates file at ${candidatesPath} is not a JSON
- plugins.local/${id} already exists — `node plugins.mjs remov
- landingjobs: unexpected API response — expected a JSON array
- local parser returned invalid JSON
AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13).
Data as JSON: /api/errors/5ad05eafdb67eb8c.
Report an issue: GitHub.