X18N0002: Config file could not be loaded
Config file could not be loaded. Fix the syntax error, or run `x18n doctor` for details.
Message
[X18N0002] Config file could not be loaded <detail>
├▶ fix: Fix the syntax error, or run `x18n doctor` for details.
╰▶ see: https://x18n.antfu.dev/errors/x18n0002The CLI prints the code and why the error happened, with details such as a file name or a field. The fix and a link to this page follow. With --json, the same parts are in errors of the envelope.
What to do
x18n found a config file, but it failed to run or read it. The message holds the error from the loader.
- Fix the syntax error that the message names.
- Make sure that a TS or JS config has a default export, for example
export default defineConfig({ ... }). - Run
x18n doctorto see which config file x18n picked.
Exit code
The CLI exits with code 2.