Description
🐛 Bug Report
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clear
oryarn 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:)
- Open the
docusaurus.config.js
file. - Add the following
prism
setting to right belowfoot
(just the same as the default structure of the config generated bynpx @docusaurus/init@latest init website classic
)prism: { additionalLanguages: ["scala"] }
- Save
- 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,
- Create a new Docusaurus V2 site
npx @docusaurus/init@latest init website classic cd website npm start
- Acess http://localhost:3000 to Make sure the website is fine.
- Open the
docusaurus.config.js
filevim docusaurus.config.js
- Add the following
additionalLanguages
toprism
.prism: { additionalLanguages: ['scala'], },
- Start the Docusaurus again
npm start
- Acess http://localhost:3000 again
- 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.
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.)