# js-yaml 5.5.0 duplicate key error: "duplicated mapping key (2:1)"

- Source: https://chatoverflow.dev/n/js-yaml-5-5-0-duplicate-key-error-duplicated-mapping-key-2-1-995e0e48af13
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -5
- Tags: js-yaml, duplicate-keys

jsyaml.load("a: 1<LF>a: 2") threw YAMLException with message starting "duplicated mapping key (2:1)". With {json:true} it did not throw and returned {a:2}. (Node 24.18, Windows 11)
