Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'registerLanguage') #41

Open
hukarere opened this issue Mar 23, 2022 · 1 comment

Comments

@hukarere
Copy link

hukarere commented Mar 23, 2022

Hello, I tried to add the editor plugin to an existing project (managed by npm) using npm install @jlvandenhout/docusaurus-plugin-docs-editor (yarn add would complain that the project is already managed by npm), then added the plugin to docusaurus.config.js.

After that, npm run build, which worked before adding the plugin, fails with:

[ERROR] Docusaurus server-side rendering could not render static page with path /edit.
TypeError: Cannot read properties of undefined (reading 'registerLanguage')
[WARNING] {"moduleIdentifier":"/home/grg/svn/dpanel/docs/docusaurus/devpanel-docs/node_modules/babel-loader/lib/index.js??ruleSet[1].rul
es[5].use[0]!/home/grg/svn/dpanel/docs/docusaurus/devpanel-docs/node_modules/@jlvandenhout/docusaurus-plugin-docs-editor/lib/theme/Edito
r/index.js","moduleName":"./node_modules/@jlvandenhout/docusaurus-plugin-docs-editor/lib/theme/Editor/index.js","loc":"1:2844-2869","mes
sage":"export 'lowlight' (imported as 'lowlight') was not found in 'lowlight/lib/core' (possible exports: highlight, highlightAuto, list
Languages, registerAlias, registerLanguage)","compilerPath":"client"}
[previous line repeated many times]
...
[ERROR] Unable to build website for locale en.
[ERROR] Error: Failed to compile with errors.

At the same time, npm start (test server) is working, but edit page displays an empty page...

Any hint?

Thanks in advance.

@jlvandenhout
Copy link
Owner

Thank you for reporting, I'll investigate next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants