santifer/career-ops · warning
⚠️ not found at
Error message
⚠️ ${label} not found at: ${path} What it means
readFile() in gemini-eval.mjs is a soft-fail helper: when the file backing a labeled input (e.g. CV, article digest) does not exist, it warns instead of throwing and returns a placeholder string '[<label> not found — skipping]' so the evaluation can proceed without that input. The message is a console.warn, not a thrown error — the pipeline deliberately degrades gracefully. It exists because the tool accepts many optional context files and missing ones should not abort a run.
Solutions
- Check the file actually exists at the printed path: ls -la <path> — fix typos or cd to the repo root first.
- Create the missing input file (e.g. cv.md or config/profile.yml) — on first run, follow the tool's onboarding to generate them.
- If the file lives elsewhere (custom data dir), set CAREER_OPS_ROOT / CAREER_OPS_DATA_DIR or update the configured path so it resolves.
- If the input is genuinely optional and you want to skip it, do nothing — the placeholder keeps the run going, but expect lower-quality output for the missing section.
Example fix
// before (file at wrong location)
const cv = readFile('cv.md', 'CV');
// after (resolve relative to repo/data root)
import { join } from 'node:path';
const DATA_ROOT = process.env.CAREER_OPS_DATA_DIR || process.cwd();
const cv = readFile(join(DATA_ROOT, 'cv.md'), 'CV'); Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from 'node:fs';
if (!existsSync(cvPath)) {
console.error(`CV file missing: ${cvPath} — create it or fix CAREER_OPS_DATA_DIR before running.`);
process.exit(1);
} Type guard
const fileExists = (p) => { try { return existsSync(p) && statSync(p).isFile(); } catch { return false; } }; Prevention
- Run the tool from the repository root, or always pass absolute paths.
- Run node doctor.mjs --json before evaluations to confirm cv.md and config/profile.yml exist.
- Set CAREER_OPS_ROOT / CAREER_OPS_DATA_DIR explicitly in your shell profile instead of relying on cwd.
- Treat the 'not found — skipping' warning as actionable: a missing CV degrades evaluation quality silently.
When it happens
Trigger: Calling readFile(path, label) when existsSync(path) is false — typically gemini-eval.mjs reading cv.md, article-digest.md, or a profile/config file at a hardcoded or configured path that is absent (typo'd path, wrong working directory, file not yet created, or the repo checked out without user data).
Common situations: Running gemini-eval.mjs from a different working directory than the repo root so relative paths like cv.md don't resolve; a fresh clone where the user layer files (cv.md, config/profile.yml) haven't been created yet during onboarding; a misconfigured CAREER_OPS_DATA_DIR pointing at an empty directory; renaming or moving cv.md without updating the path.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- ⚠️ Could not save report
- apify: JD cache write failed for
- ⚠️ Could not release report reservation
- ⚠️ Could not release report reservation
- ⚠️ Could not save HTML
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/82464d5fe323e140.
Report an issue: GitHub.
Appendix: source
Thrown at gemini-eval.mjs:242
// ---------------------------------------------------------------------------
const apiKey = process.env.GEMINI_API_KEY;
if (!apiKey) {
console.error(`
❌ GEMINI_API_KEY not found.
1. Get a free key at https://aistudio.google.com/apikey
2. Add it to .env: GEMINI_API_KEY=your_key_here
3. Or export it: export GEMINI_API_KEY=your_key_here
`);
process.exit(1);
}
// ---------------------------------------------------------------------------
// File helpers
// ---------------------------------------------------------------------------
function readFile(path, label) {
if (!existsSync(path)) {
console.warn(`⚠️ ${label} not found at: ${path}`);
return `[${label} not found — skipping]`;
}
return stripBom(readFileSync(path, 'utf-8')).trim();
}
function validateEvaluationShape(text) {
const issues = [];
const requiredBlocks = [
['A', /(?:^|\n)#{1,3}\s*(?:A[).:-]?|Block A\b)/im],
['B', /(?:^|\n)#{1,3}\s*(?:B[).:-]?|Block B\b)/im],
['C', /(?:^|\n)#{1,3}\s*(?:C[).:-]?|Block C\b)/im],
['D', /(?:^|\n)#{1,3}\s*(?:D[).:-]?|Block D\b)/im],
['E', /(?:^|\n)#{1,3}\s*(?:E[).:-]?|Block E\b)/im],
['F', /(?:^|\n)#{1,3}\s*(?:F[).:-]?|Block F\b)/im],
['G', /(?:^|\n)#{1,3}\s*(?:G[).:-]?|Block G\b)/im],
];
for (const [label, pattern] of requiredBlocks) {View on GitHub (pinned to aac998c7ed)