How to solve error nested mappings are not allowed in compact mappings

check tabs and spaces. YAML expects indentations with spaces, not tabs. A lot of editors allow you to automatically convert tabs to spaces. It’s usually in the settings somewhere and you’ll want that switched on if you intend to tab-indent YAML.