santifer/career-ops · error · Error
config/profile.yml not found: fill it in first
Error message
config/profile.yml not found: fill it in first
What it means
Thrown by loadProfile() when no custom profile path is supplied (customProfilePath is null) and the resolved profile source — customCvPath env CAREER_OPS_PROFILE or the default config/profile.yml — does not exist on disk. This is the standard onboarding error: the library refuses to run with an unfilled profile.
Solutions
- Create config/profile.yml from the example: cp config/profile.example.yml config/profile.yml and fill in name, email, target roles, salary range.
- If you meant a custom path, pass it as the first argument to loadProfile() instead of relying on the default.
- Check the CAREER_OPS_PROFILE env var — unset it or point it at an existing file.
- Run the repo's setup/onboarding (e.g. node doctor.mjs) to detect and fix missing setup files.
Example fix
// before (file missing) const profile = loadProfile(); // after (shell) // cp config/profile.example.yml config/profile.yml && $EDITOR config/profile.yml // then const profile = loadProfile();
Defensive patterns
Strategy: fallback
Validate before calling
import { existsSync } from 'node:fs';
const profileSource = process.env.CAREER_OPS_PROFILE || 'config/profile.yml';
if (!existsSync(profileSource)) {
copyFileSync('config/profile.example.yml', 'config/profile.yml'); // then prompt user to edit
} Try / catch
try {
const profile = loadProfile();
} catch (err) {
if (/config\/profile.yml not found/.test(err.message)) {
// run onboarding: copy example template and ask user to fill it
} else throw err;
} Prevention
- Run the repo's doctor/onboarding check at session start to detect a missing profile.
- Create config/profile.yml immediately after cloning (cp config/profile.example.yml config/profile.yml).
- If the profile must exist in CI, commit it or generate it in a setup step before running scripts.
- Verify the CAREER_OPS_PROFILE env var points at an existing file.
When it happens
Trigger: Calling loadProfile() (or loadProfile(null, cvPath)) in a repo where config/profile.yml is missing, or where CAREER_OPS_PROFILE points at a nonexistent file.
Common situations: Fresh clone where config/profile.yml was never created from the example template; profile gitignored so CI/containers lack it; wrong working directory; CAREER_OPS_PROFILE env var set to a wrong path.
Related errors
- CV file not found at
- ⚠️ No matching evaluation file found in
- portals file not found
- portals.yml not found
- Profile configuration file not found at
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/4411b8628b4bd079.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/export-ats-text.mjs:234
let profileRaw = null;
const profileSource = customProfilePath || process.env.CAREER_OPS_PROFILE || 'config/profile.yml';
if (customProfilePath) {
if (!existsSync(customProfilePath)) {
throw new Error(`Profile configuration file not found at: ${customProfilePath}`);
}
try {
const content = readFileSync(customProfilePath, 'utf8');
profileRaw = yaml.load(content);
if (!profileRaw || typeof profileRaw !== 'object') {
throw new Error(`Invalid YAML in profile file: ${customProfilePath}`);
}
} catch (err) {
throw new Error(`Failed to read profile file at ${customProfilePath}: ${err.message}`);
}
} else {
if (!existsSync(profileSource)) {
throw new Error('config/profile.yml not found: fill it in first');
}
try {
const content = readFileSync(profileSource, 'utf8');
profileRaw = yaml.load(content);
if (!profileRaw || typeof profileRaw !== 'object') {
throw new Error('config/profile.yml is empty or invalid YAML: fill it in first');
}
} catch (err) {
throw new Error(`Failed to read profile file at ${profileSource}: ${err.message}`);
}
}
let cvData = {};
const cvSource = customCvPath || process.env.CAREER_OPS_CV || 'cv.md';
if (customCvPath) {
if (!existsSync(customCvPath)) {
throw new Error(`CV file not found at: ${customCvPath}`);
}View on GitHub (pinned to aac998c7ed)