X18N4002: Rename target already exists
Rename target already exists. Delete or rename the existing key first.
Message
[X18N4002] Rename target already exists <detail>
├▶ fix: Delete or rename the existing key first.
╰▶ see: https://x18n.antfu.dev/errors/x18n4002The 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 rename target already exists in at least one locale. x18n does not merge two keys.
- Run
x18n get <to>to see the existing key. - Delete or rename it first, then run the rename again.
Exit code
The CLI exits with code 1.