7 chars · 1 line
Waiting for input
7 chars · 1 line
Waiting for input
YAML anchor and alias troubleshooting
The preloaded mapping assigns a bare * to copy. YAML interprets * as the start of an alias, so it needs a valid alias name and normally a corresponding anchor defined earlier in the document. This tool is free to use. No account or payment is required.
Last updated
YAML uses &name to anchor a node and *name to reference it later. Because * has structural meaning at the start of a node, a bare asterisk cannot stand alone as an ordinary scalar.
A well-formed alias name is only part of the check. The referenced anchor should be available before the alias is used, so review both syntax and document order when an alias still fails after naming it.
A named anchor is defined first and then referenced with the matching alias.
copy: *base: &defaults
enabled: true
copy: *defaultsCommon questions
It is an alias reference to a node previously marked with the matching &name anchor.
Not as an unquoted scalar at the start of a value because YAML interprets it as alias syntax. Quote it if the asterisk itself is the data you need.
A YAML alias is expected to resolve to a preceding anchor in the document, so define the anchor before the alias reference.
Debugging a specific YAML issue? Browse YAML troubleshooting.