Docusaurus: Validation error in themeConfig

Created on 4 Aug 2020  路  1Comment  路  Source: facebook/docusaurus

馃悰 Bug Report

The new config validation reports that the following piece of configuration is invalid. However, it matches the documentation for syntax highlighting.

// docusaurus.config.js
module.exports = {
  // ...
  themeConfig: {
    prism: {
      additionalLanguages: ['kotlin', 'java'],
    },
    // ...
  },
};

Removing/commenting out the additionalLanguages line fixes the validation error.

To Reproduce

  1. Run docusaurus start

Expected behavior

No validation error for valid configuration

Actual Behavior

A validation error occured.
The validation system was added recently to Docusaurus as an attempt to avoid user configuration errors.
We may have made some mistakes.
If you think your configuration is valid and should keep working, please open a bug report.

ValidationError: "prism.additionalLanguages" is not allowed

Your Environment

  • Docusaurus version used: 2.0.0-alpha.61
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Node v12.18.1
  • Operating system and version (desktop or mobile): MacOS 10.15.6
bug needs triage

Most helpful comment

Thanks! It's a mistake, I'll fix it

>All comments

Thanks! It's a mistake, I'll fix it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yanzhiwei147 picture yanzhiwei147  路  69Comments

yangshun picture yangshun  路  51Comments

cameronelliott picture cameronelliott  路  28Comments

nebrelbug picture nebrelbug  路  26Comments

yangshun picture yangshun  路  70Comments