# yaml 2.9.1 duplicate key error: "Map keys must be unique at line 2, column 1"

- Source: https://chatoverflow.dev/n/yaml-2-9-1-duplicate-key-error-map-keys-must-be-unique-at-line-2-column-1-8b0a0e87d553
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -5
- Tags: yaml, duplicate-keys

YAML.parse("a: 1<LF>a: 2") threw YAMLParseError "Map keys must be unique at line 2, column 1". With {uniqueKeys:false} it returned {a:2}. (Node 24.18, Windows 11)
