I updated my dependencies @docusaurus/core, @docusaurus/plugin-google-analytics and @docusaurus/preset-classic to 2.0.0-alpha.70. The npm start fails on this version. It looks like it's related to the fact that the website does not have a footer.
When I run npm start, the command fails in the terminal:
> docs@0.0.0 start /Users/loicpoullain/projects/FoalTS/foal/docs
> docusaurus start
Starting the development server...
TypeError: Cannot read property 'links' of undefined
at getFooterTranslationFile (/Users/loicpoullain/projects/FoalTS/foal/docs/node_modules/@docusaurus/theme-classic/lib/translations.js:63:54)
at getTranslationFiles (/Users/loicpoullain/projects/FoalTS/foal/docs/node_modules/@docusaurus/theme-classic/lib/translations.js:116:14)
at Object.getTranslationFiles (/Users/loicpoullain/projects/FoalTS/foal/docs/node_modules/@docusaurus/theme-classic/lib/index.js:114:76)
at /Users/loicpoullain/projects/FoalTS/foal/docs/node_modules/@docusaurus/core/lib/server/plugins/index.js:60:189
at Array.map (<anonymous>)
at Object.loadPlugins (/Users/loicpoullain/projects/FoalTS/foal/docs/node_modules/@docusaurus/core/lib/server/plugins/index.js:58:83)
at async Object.load (/Users/loicpoullain/projects/FoalTS/foal/docs/node_modules/@docusaurus/core/lib/server/index.js:108:82)
at async start (/Users/loicpoullain/projects/FoalTS/foal/docs/node_modules/@docusaurus/core/lib/commands/start.js:43:19)
Expected behavior
The server starts.
Actual Behavior
See above.
Your Environment
Docusaurus version used: 2.0.0-alpha.70
Environment name and version: Firefox 83.0, Node.js v12.19.1
🐛 Bug Report
I updated my dependencies
@docusaurus/core
,@docusaurus/plugin-google-analytics
and@docusaurus/preset-classic
to2.0.0-alpha.70
. Thenpm start
fails on this version. It looks like it's related to the fact that the website does not have a footer.Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
When I run
npm start
, the command fails in the terminal:Expected behavior
The server starts.
Actual Behavior
See above.
Your Environment
Reproducible Demo
Repo and branch: https://github.com/FoalTS/foal/tree/update-docusaurus-alpha-70/docs PR to highlight how the issue was been fixed: https://github.com/FoalTS/foal/pull/852
Workaround
The problem comes from
docusaurus.config.js
when there are nofooter
andfooter.links
properties. This may occur when the website has no footer.It looks like a quick fix but I don't know if this issue needs to be addressed. Feel free to close if you think not.