santifer/career-ops · warning
⚠️ modes_dir " " not found; using default modes/
Error message
⚠️ modes_dir "${customModesDir}" not found; using default modes/ What it means
This warning fires when language.modes_dir in config/profile.yml names a directory that does not exist on disk (the existsSync(dirPath) check fails). The tool falls back to the default modes/ directory, so evaluation proceeds but without the market-specific modes the user intended. It is a silent-degradation warning: expect default (English) evaluation vocabulary and rules.
Solutions
- Check the directory exists: `ls modes/` and compare with the modes_dir value in config/profile.yml; fix typos (e.g. modes/de, not modes/deutch).
- Create the missing directory and populate it from the shipped market template (copy modes/de/ for German, modes/fr/ for French, etc.).
- If the market dir is not needed, remove the language.modes_dir key from config/profile.yml so the default modes/ is used without warnings.
Example fix
# before (config/profile.yml) language: modes_dir: modes/dutch # does not exist # after language: modes_dir: modes/de # shipped German market dir # or create it: mkdir -p modes/dutch && cp modes/de/*.md modes/dutch/
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from 'node:fs';
import { resolve } from 'node:path';
const md = profile?.language?.modes_dir;
if (md && !existsSync(resolve(md))) {
console.warn(`modes_dir "${md}" does not exist — fix config/profile.yml or create the directory`);
} Try / catch
try {
await runEvaluation();
} catch (err) {
if (/modes_dir .* not found/.test(err.message)) {
console.warn('Check the modes_dir path in config/profile.yml; default modes/ was used instead.');
} else throw err;
} Prevention
- Run `ls <modes_dir>` after editing config/profile.yml to confirm the directory exists before evaluating.
- Copy market dirs from templates/portals or the shipped modes/ tree rather than typing paths from memory.
- Keep modes_dir values short and relative (modes/de, modes/fr) to reduce typo risk.
- Re-verify the profile after repo updates that may rename or restructure modes/.
When it happens
Trigger: config/profile.yml sets language.modes_dir to a path inside the project root that is absent — e.g. modes_dir: modes/es before creating modes/es, a typo like modes/deutsh, or the directory was deleted/renamed after the profile was written.
Common situations: Users enable a market mode (e.g. modes_dir: modes/ja) before checking out/copying that market directory; typos in the modes_dir value; directories lost after a repo update or incomplete manual installation; profile copied from another project whose modes layout differs.
Related errors
- ⚠️ No matching evaluation file found in
- ⚠️ Could not parse config/profile.yml
- ⚠️ modes_dir " " escapes project root; using default modes/
- apify: entry has invalid field_map. Each of title, url…
- apify: entry missing 'actor' (e.g. misceres/indeed-scraper)
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/844e2e33748b98f0.
Report an issue: GitHub.
Appendix: source
Thrown at gemini-eval.mjs:125
const profile = yaml.load(yamlContent);
if (profile && profile.language && profile.language.modes_dir) {
const customModesDir = profile.language.modes_dir;
const dirPath = resolve(CODE_ROOT, customModesDir);
const rel = relative(CODE_ROOT, dirPath);
if (rel.startsWith('..') || isAbsolute(customModesDir)) {
console.warn(`⚠️ modes_dir "${customModesDir}" escapes project root; using default modes/`);
} else {
if (existsSync(dirPath)) {
const candidateFiles = ['oferta.md', 'angebot.md', 'offre.md', 'kyujin.md', 'is-ilani.md', 'naukri.md'];
const found = candidateFiles.find((file) => existsSync(join(dirPath, file)));
if (found) {
modesDir = customModesDir;
evalFilename = found;
} else {
console.warn(`⚠️ No matching evaluation file found in ${customModesDir}; using default modes/oferta.md`);
}
} else {
console.warn(`⚠️ modes_dir "${customModesDir}" not found; using default modes/`);
}
}
}
} catch (err) {
console.warn(`⚠️ Could not parse config/profile.yml: ${err.message}`);
}
}
PATHS.shared = join(CODE_ROOT, modesDir, '_shared.md');
PATHS.oferta = join(CODE_ROOT, modesDir, evalFilename);
// ---------------------------------------------------------------------------
// CLI argument parsing
// ---------------------------------------------------------------------------
const args = process.argv.slice(2);
if (args.length === 0 || args[0] === '--help' || args[0] === '-h') {
console.log(`View on GitHub (pinned to aac998c7ed)