X18N3001: Source file could not be scanned
Source file could not be scanned. Fix the syntax error, or exclude the file with `usage.exclude`.
Message
[X18N3001] Source file could not be scanned <detail>
├▶ fix: Fix the syntax error, or exclude the file with `usage.exclude`.
╰▶ see: https://x18n.antfu.dev/errors/x18n3001The 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 scanner failed to parse a source file, so x18n did not find the usages in it.
- Fix the syntax error in the file.
- If the file is generated or is not source code, exclude it with
usage.exclude.
x18n check reports this as an invalid-resource warning on the file.
Exit code
The CLI exits with code 1.