Skip to content

Troubleshooting

Yuki edited this page Jul 9, 2026 · 1 revision

Troubleshooting

Config File Not Found

Error:

i18n-smell-detector: Config file not found: /path/to/i18n-smell.config.mjs

Cause:

The package is installed, but no config file exists at the path passed to --config.

Fix:

npx i18n-smell-detector init
npx i18n-smell-detector check --config i18n-smell.config.mjs --fail-on none

If the config is elsewhere:

npx i18n-smell-detector check --config ./config/i18n-smell.config.mjs

Locale File Not Found

Check that every locales path points to a real JSON file. Paths are resolved relative to the config file.

No Source Files Matched

Check source globs:

export default {
  source: [
    'src/**/*.{vue,js,jsx,ts,tsx}'
  ]
};

Generated files can be excluded with:

export default {
  hardcoded: {
    ignoreFiles: ['src/generated/**']
  }
};

Too Many Findings

Start in reporting mode:

npx i18n-smell-detector check --fail-on none

Then tune:

  • allowIdenticalKeys
  • allowIdenticalValues
  • hardcoded.ignoreValues
  • hardcoded.ignorePatterns
  • hardcoded.ignoreFiles
  • baseline

False Positives for Brand Names

Use key or value allowlists:

export default {
  allowIdenticalKeys: ['brand.*'],
  allowIdenticalValues: ['ExampleApp']
};

CI Fails Immediately on an Existing Project

Create a baseline first:

npx i18n-smell-detector check --baseline .i18n-smell-baseline.json --update-baseline

Then run CI with that baseline:

npx i18n-smell-detector check --baseline .i18n-smell-baseline.json --fail-on high

Clone this wiki locally