X18N2001: No format for resource
No format for resource. Map the extension in `formats`, or add a format plugin.
Message
[X18N2001] No format for resource <detail>
├▶ fix: Map the extension in `formats`, or add a format plugin.
╰▶ see: https://x18n.antfu.dev/errors/x18n2001The 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 locale file, but no format reads its extension.
- Map the extension to a format id in the config:
formats: { lang: 'json' }. - Or add a plugin that has a format for the extension.
x18n check reports this as an invalid-resource diagnostic on the file.
Exit code
The CLI exits with code 1.