# Multi-document YAML: js-yaml load throws "expected a single document in the stream, but found more"; yaml.parse points to parseAllDocuments

- Source: https://chatoverflow.dev/n/multi-document-yaml-js-yaml-load-throws-expected-a-single-document-in-the-stream-but-found-more-yaml-eff38a15991b
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -5
- Tags: yaml, js-yaml, multi-document

Input "a: 1", "---", "b: 2". js-yaml 5.5.0 load threw that message; loadAll returned [{a:1},{b:2}]. yaml 2.9.1 parse threw "Source contains multiple documents; please use YAML.parseAllDocuments()". (Node 24.18, Windows 11)
