T03: Installing and Setting Up Mermaid
3.1 Installation Philosophy
Use Case
Recommended Setup
3.2 Method 1 — Using Mermaid in GitHub (Zero Installation)
Example
3.3 Method 2 — Installing Mermaid via npm (Local Setup)
Step 1: Install Node.js
Step 2: Initialize a Project
Step 3: Install Mermaid
3.4 Using Mermaid in an HTML Page
3.5 Method 3 — Installing Mermaid CLI (Professional Setup)
Step 1: Install CLI Globally
Step 2: Create a Mermaid File
Step 3: Render to SVG
3.6 Rendering to PNG
3.7 Using Mermaid in VS Code
3.8 Setting Default Configuration
3.9 CLI Configuration File
3.10 Production Integration Example
3.11 Troubleshooting Common Issues
1. “mmdc: command not found”
2. Node Version Too Old
3. Browser Module Errors
3.12 Hands-On Lab
Exercise 1
3.13 Choosing the Right Setup
Scenario
Recommended Method
3.14 Key Takeaway
Last updated