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

Error when running with Docusaurus v2.2.0 #222

Closed
dabeeeenster opened this issue Oct 29, 2022 · 2 comments · Fixed by #223
Closed

Error when running with Docusaurus v2.2.0 #222

dabeeeenster opened this issue Oct 29, 2022 · 2 comments · Fixed by #223

Comments

@dabeeeenster
Copy link

dabeeeenster commented Oct 29, 2022

Hi

Upgrading to Docusaurus v2.2.0 I get this:

❯ npm run build

> [email protected] build
> docusaurus build

[INFO] [en] Creating an optimized production build...
WARNING: Loading a directory of OpenAPI definitions is experimental and subject to unannounced breaking changes.

● Client █████████████████████████ building (11%) 0/1 entries 708/737 dependencies 105/303 modules 74 active
 babel-loader › mdx-loader › docs/guides-and-examples/testing-push-notifications.md

● Server █████████████████████████ building (11%) 0/1 entries 881/947 dependencies 166/413 modules 120 active
 babel-loader › mdx-loader › docs/clients/client-side/android.md

[ERROR] TypeError: Cannot read properties of undefined (reading 'mermaid')
    at Object.mdxLoader (/Users/ben/flagsmith/docs/node_modules/@docusaurus/mdx-loader/lib/loader.js:115:43)
    at LOADER_EXECUTION (/Users/ben/flagsmith/docs/node_modules/loader-runner/lib/LoaderRunner.js:132:14)
    at runSyncOrAsync (/Users/ben/flagsmith/docs/node_modules/loader-runner/lib/LoaderRunner.js:133:4)
    at iterateNormalLoaders (/Users/ben/flagsmith/docs/node_modules/loader-runner/lib/LoaderRunner.js:250:2)
    at /Users/ben/flagsmith/docs/node_modules/loader-runner/lib/LoaderRunner.js:223:4
    at /Users/ben/flagsmith/docs/node_modules/webpack/lib/NormalModule.js:834:15
    at eval (eval at create (/Users/ben/flagsmith/docs/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
    at runNextTicks (node:internal/process/task_queues:65:3)
    at processImmediate (node:internal/timers:437:9)
[INFO] Docusaurus version: 2.2.0
Node version: v16.15.1

The PR we have on this if you want to reproduce is here: Flagsmith/flagsmith-docs#221

@sean-perkins
Copy link
Contributor

sean-perkins commented Nov 8, 2022

I've identified the regression in Docusaurus 2.2.0 that is causing this issue. I've reported that bug here: facebook/docusaurus#8298.

I'll submit two PRs:

  • One to this repository to add a back-fix to allow compatibility with Docusaurus 2.2.0
  • One to Docusaurus to fix the breaking change for future releases

Edit:

Just the one PR. Docusaurus is not interested in a change to their source for this undocumented API at this time.

@dabeeeenster
Copy link
Author

Confirmed as fixed!

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

Successfully merging a pull request may close this issue.

2 participants