You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the console error message carefully (if applicable).
Description
We get the below error when following the instructions here to implement Mermaid with Docusaurus 2.2
TypeError: Cannot read properties of undefined (reading 'mermaidAPI')
The error occurs when loading a page with a Mermaid diagram on it.
After some investigation it would appear that Mermaid 9.2 was released today and this caused the issue.
To resolve it, when added this to the package.json: "mermaid": "9.1.1",
rather than
"mermaid": "^9.1.1",
I have reproduced the issue on a fresh site as well as our own
Reproducible demo
No response
Steps to reproduce
Create new site of docusaurus
add the Mermaid changes as per the documentation
make a page with mermaid in them (add the ticks):
mermaid
graph LR
A[Build your site] --> B[Deploy your site]
install npm packages
start site
navigate to page
Expected behavior
page loads
Actual behavior
page crashes with:
TypeError: Cannot read properties of undefined (reading 'mermaidAPI')
Your environment
Docusaurus version used: 2.2.
Environment name and version (e.g. Chrome 89, Node.js 16.4): Edge (106.0.1370.52 64bit); Node 16.15.0
Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windows 10 21H2
Self-service
I'd be willing to fix this bug myself.
The text was updated successfully, but these errors were encountered:
xenon8
added
bug
An error in the Docusaurus core causing instability or issues with its execution
status: needs triage
This issue has not been triaged by maintainers
labels
Nov 1, 2022
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
We get the below error when following the instructions here to implement Mermaid with Docusaurus 2.2
TypeError: Cannot read properties of undefined (reading 'mermaidAPI')
The error occurs when loading a page with a Mermaid diagram on it.
After some investigation it would appear that Mermaid 9.2 was released today and this caused the issue.
To resolve it, when added this to the package.json:
"mermaid": "9.1.1",
rather than
"mermaid": "^9.1.1",
I have reproduced the issue on a fresh site as well as our own
Reproducible demo
No response
Steps to reproduce
mermaid
graph LR
A[Build your site] --> B[Deploy your site]
Expected behavior
page loads
Actual behavior
page crashes with:
TypeError: Cannot read properties of undefined (reading 'mermaidAPI')
Your environment
Self-service
The text was updated successfully, but these errors were encountered: