docusaurus-plugin-docs-editor icon indicating copy to clipboard operation
docusaurus-plugin-docs-editor copied to clipboard

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

Open hukarere opened this issue 3 years ago • 1 comments

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.

hukarere avatar Mar 23 '22 18:03 hukarere

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

jlvandenhout avatar Mar 26 '22 14:03 jlvandenhout