πŸ“… 2025-05-23 β€” Session: Resolved Docusaurus CLI and MDX errors

πŸ•’ 17:30–18:20
🏷️ Labels: Docusaurus, MDX, CLI, Error Fix, Webpack
πŸ“‚ Project: Dev
⭐ Priority: MEDIUM

Session Goal:

The primary objective was to address and fix various errors encountered during the build process of a Docusaurus project, specifically focusing on CLI not found issues and MDX compilation errors.

Key Activities:

  • Docusaurus CLI Error Fix: A step-by-step guide was followed to resolve the β€˜docusaurus: not found’ error by reinstalling dependencies and running a clean build. An optional verification method for the local CLI path was also considered.
  • Webpack Caching Issue: A reflection on Webpack’s warning about non-serializable data structures was documented, outlining potential causes and actions to mitigate the issue.
  • MDX Compilation Debugging: Instructions were provided to debug common MDX compilation errors related to malformed frontmatter and illegal syntax.
  • MDX Runtime Exception: Steps were taken to fix a runtime exception in MDX pages during static site generation, particularly addressing an undefined variable β€˜platform’.
  • Curly Braces in MDX: Guidance was given on how to escape curly braces in MDX to prevent misinterpretation by the parser.

Achievements:

  • Successfully resolved the Docusaurus CLI not found error.
  • Identified and implemented fixes for MDX compilation and runtime errors.
  • Documented insights on handling Webpack caching issues.

Pending Tasks:

  • Further investigation into Webpack caching issues and potential optimizations.
  • Continued monitoring of MDX error handling to ensure robustness in future builds.