Cannot read properties of undefined (reading 'name') when antora.yml is empty
After following the Antora documentation, I have a playbook repository (https://gitlab.com/namespace/antora-playbook.git) that looks like this:
├── package-lock.json
├── package.json
└── playbook.yml
And a content repository (https://gitlab.com/namespace/antora-example.git) that looks like this:
├── antora.yml
├── modules
│ └── ROOT
│ └── pages
│ └── index.adoc
├── package-lock.json
└── package.json
My playbook.yml file looks like this:
site:
title: Demo Site
url: https://demo-site.com
content:
sources:
- url: https://gitlab.com/namespace/antora-example.git
branches: [main] <-- tried without the brackets as well.
ui:
bundle:
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
snapshot: true
My antora.yml file looks like this:
name: demo-site
title: Demo Site
version: 'v1.0'
display_version: 'Version 1.0'
I installed Antora according to the documentation using Node 16.20.2 and included this configuration in my package.json from your security notice:
{
"overrides": {
"vinyl-fs": {
"glob-stream": "~7.0"
}
},
"devDependencies": {
"@antora/cli": "3.1.7",
"@antora/site-generator": "3.1.7"
}
}
The problem is, when I run npx antora playbook.yml I get the following error:
Cannot read properties of undefined (reading 'name') in https://gitlab.com/namespace/antora-example.git (branch: main)
Here's the stacktrace:
Cause: TypeError
at loadComponentDescriptor (/antora-playbook/node_modules/@antora/content-aggregator/lib/aggregate-content.js:695:12)
at /antora-playbook/node_modules/@antora/content-aggregator/lib/aggregate-content.js:442:52
at async collectFilesFromStartPaths (/antora-playbook/node_modules/@antora/content-aggregator/lib/aggregate-content.js:431:18)
at async Promise.all (index 0)
at async Promise.all (index 0)
at async generateSite (/antora-playbook/node_modules/@antora/site-generator/lib/generate-site.js:23:5)
at async Command.parseAsync (/antora-playbook/node_modules/commander/lib/command.js:935:5)