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

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

Session Goal

The primary objective of this session was to address and resolve various errors encountered during the build and static site generation processes using Docusaurus and MDX.

Key Activities

  • Fixing Docusaurus CLI Not Found Error: Reinstalled dependencies and ran a clean build to resolve the error.
  • Addressed Webpack Warning: Investigated non-serializable data structures in Webpack’s caching system, specifically VFileMessage objects, and outlined potential solutions.
  • Debugged MDX Compilation Errors: Identified and fixed common MDX compilation errors related to malformed frontmatter and illegal syntax.
  • Resolved MDX Runtime Exception: Fixed a runtime exception in MDX pages caused by an undefined variable β€˜platform’ during static site generation.
  • Escaped Curly Braces in MDX: Implemented a method to prevent MDX parser from interpreting curly braces as JavaScript.

Achievements

  • Successfully resolved the Docusaurus CLI error and MDX runtime exceptions.
  • Improved understanding of Webpack caching issues and MDX syntax handling.

Pending Tasks

  • Further investigation into Webpack caching strategies may be needed.
  • Review and optimize the MDX debugging process for future occurrences.