X18N2002: Resource could not be parsed
Resource could not be parsed. Fix the syntax error in the file.
Message
[X18N2002] Resource could not be parsed <detail>
├▶ fix: Fix the syntax error in the file.
╰▶ see: https://x18n.antfu.dev/errors/x18n2002The 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
A locale file has a syntax error. The message names the file and the position.
- Open the file and fix the syntax error.
- Run
x18n checkagain.
x18n check reports this as an invalid-resource diagnostic on the file.
Exit code
The CLI exits with code 1.
Source
packages/builtins/src/formats/ecmascript.tspackages/builtins/src/formats/ftl.tspackages/builtins/src/formats/ini.tspackages/builtins/src/formats/json.tspackages/builtins/src/formats/json5.tspackages/builtins/src/formats/php.tspackages/builtins/src/formats/po.tspackages/builtins/src/formats/properties.tspackages/builtins/src/formats/yaml.tspackages/core/src/project/project.ts