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/x18n2002

The 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.

  1. Open the file and fix the syntax error.
  2. Run x18n check again.

x18n check reports this as an invalid-resource diagnostic on the file.

Exit code

The CLI exits with code 1.

Source