8000 Adding scala to additionalLanguages in prism breaks Docusaurus V2 · Issue #5013 · facebook/docusaurus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Adding scala to additionalLanguages in prism breaks Docusaurus V2 #5013
Closed
@kevin-lee

Description

@kevin-lee

🐛 Bug Report

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io
  • I have read the console error message carefully (if applicable)

Description

Adding scala to additionalLanguages in prism breaks Docusaurus V2.

Have you read the Contributing Guidelines on issues?

Yes I have.

Steps to reproduce

Use https://new.docusaurus.io to create a CodeSandbox reproducible demo of the bug.

(Write your steps here:)

  1. Open the docusaurus.config.js file.
  2. Add the following prism setting to right below foot (just the same as the default structure of the config generated by npx @docusaurus/init@latest init website classic)
    prism: {
        additionalLanguages: ["scala"]
    }
  3. Save
  4. The result on the right-hand side is just a blank page.

Steps to reproduce on the local environment

Additional instructions to reproduce on the local machine,

  1. Create a new Docusaurus V2 site
    npx @docusaurus/init@latest init website classic
    cd website
    npm start
  2. Acess http://localhost:3000 to Make sure the website is fine.
  3. Open the docusaurus.config.js file
    vim docusaurus.config.js
  4. Add the following additionalLanguages to prism.
    prism: {
      additionalLanguages: ['scala'],
    },
  5. Start the Docusaurus again
    npm start
  6. Acess http://localhost:3000 again
  7. Get the blank page.

NOTE: npm start on the console shows no error

npm start

> website@0.0.0 start /private/tmp/docs/website
> docusaurus start

Starting the development server...
Docusaurus website is running at "http://localhost:3000/".

✔ Client
  Compiled successfully in 1.65s

ℹ 「wds」: Project is running at http://localhost:3000/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /private/tmp/docs/website
ℹ 「wds」: 404s will fallback to /index.html

Expected behavior

Just a normal Docusaurus V2 website when accessing http://localhost:3000

Actual behavior

A blank page when accessing http://localhost:3000

Chrome's Developer Tools console shows this error.
Screen Shot 2021-06-19 at 5 28 29 pm

Here is the downloaded log.
localhost-1624087717210.log

Your environment

  • Public source code: Tested locally and it's so easy to reproduce with the steps I provided.

  • Public site URL: Tested locally and it's so easy to reproduce with the steps I provided.

  • Node Environment

    $ npm --version
    6.14.11
    
    $ node --version
     v14.16.0
  • Chrome: 91.0.4472.106

  • Operating System: macOS Big Sur 11.4

  • Docusaurus version: 2.0.0-beta.1

Reproducible demo

Use https://new.docusaurus.io to create a CodeSandbox reproducible demo of the bug.

https://codesandbox.io/s/happy-hugle-q0kr8?file=/docusaurus.config.js:1975-2026

(Paste the link to an example repo, including a docusaurus.config.js, and exact instructions to reproduce the issue.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionclosed: questionThis issue is a user error/misunderstanding.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0