How To Fix Hugo Website Error - from config failed to resolve output format headers from site config
Introduction
Sometimes you might encounter the following error on typing hugo server from your local website directory.
Error: from config: failed to resolve output format "headers" from site config
To resolve the error, head over to config/_default/config.yaml and temporily rewrite the following line as follows:
outputs:
home: [RSS, JSON, WebAppManifest]
Open terminal and from the home directory of the website type the following commands:
hugo mod clean
hugo mod get -u ./...
hugo mod tidy
When the update is complete head over to config/_default/config.yaml and restore the items that were rewritten.
outputs:
home: [HTML, RSS, JSON, WebAppManifest, headers, redirects]
Now type hugo server from the website home directory and it should successfully start a server.