Skip to content

Fix MDX syntax errors blocking Vercel deployment - #60

Merged
hotlong merged 2 commits into
copilot/refactor-content-docsfrom
copilot/refactor-content-docs-again
Feb 1, 2026
Merged

hotlong merged 2 commits into
copilot/refactor-content-docsfrom
copilot/refactor-content-docs-again

Conversation

Copilot AI commented Feb 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

Vercel build failed due to MDX parser treating < in numeric comparisons as JSX tag delimiters. Escaped special characters with HTML entities.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • CI/CD update

Changes Made

Error Pattern:

- Health score: <40        # Parser error: '<40' interpreted as malformed JSX
- Target: <5% annual churn # Same issue

Fix:

- Health score: &lt;40        # HTML entity escaping
- Target: &lt;5% annual churn

Files Modified:

  • content/docs/features/contracts-payments.mdx: Escaped <40 and <5% in health scoring and churn rate sections
  • content/docs/features/lead-management.mdx: Escaped >70 and <30 in Mermaid flowchart diagram

Testing

  • Unit tests pass (npm test)
  • Linting passes (npm run lint)
  • Build succeeds (npm run build)
  • Manual testing completed
  • New tests added (if applicable)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Validated all MDX files for similar patterns. No additional instances found.

Original prompt

拉取请求: #59

03:38:03.568 Running build in Washington, D.C., USA (East) – iad1
03:38:03.569 Build machine configuration: 4 cores, 8 GB
03:38:03.702 Cloning github.com/objectstack-ai/hotcrm (Branch: copilot/refactor-content-docs, Commit: c096d80)
03:38:04.159 Cloning completed: 457.000ms
03:38:04.572 Restored build cache from previous deployment (7DTvuatYqr62qh8phbSXEGGvzNBX)
03:38:04.905 Running "vercel build"
03:38:05.802 Vercel CLI 50.9.6
03:38:06.127 Detected pnpm-lock.yaml 9 which may be generated by pnpm@9.x or pnpm@10.x
03:38:06.128 Using pnpm@10.x based on project creation date
03:38:06.128 To use pnpm@9.x, manually opt in using corepack (https://vercel.com/docs/deployments/configure-a-build#corepack)
03:38:06.168 Installing dependencies...
03:38:06.776 Scope: all 9 workspace projects
03:38:07.738
03:38:07.753 . postinstall$ fumadocs-mdx
03:38:08.217 . postinstall: [MDX] generated files in 21.72096099999999ms
03:38:08.226 . postinstall: Done
03:38:08.255 ╭ Warning ─────────────────────────────────────────────────────────────────────╮
03:38:08.255 │ │
03:38:08.255 │ Ignored build scripts: esbuild@0.27.2, sharp@0.34.5. │
03:38:08.255 │ Run "pnpm approve-builds" to pick which dependencies should be allowed │
03:38:08.255 │ to run scripts. │
03:38:08.255 │ │
03:38:08.255 ╰──────────────────────────────────────────────────────────────────────────────╯
03:38:08.262 Done in 1.9s using pnpm v10.28.0
03:38:08.278 Detected Next.js version: 16.1.4
03:38:08.312 Running "pnpm run build"
03:38:08.620
03:38:08.620 > @hotcrm/docs@0.0.0 build /vercel/path0/apps/docs
03:38:08.621 > next build
03:38:08.621
03:38:09.708 [MDX] generated files in 26.44409500000006ms
03:38:09.713 ▲ Next.js 16.1.4 (Turbopack)
03:38:09.714
03:38:09.750 Creating an optimized production build ...
03:38:35.346
03:38:35.346 > Build error occurred
03:38:35.348 Error: Turbopack build failed with 1 errors:
03:38:35.348 ./content/docs/features/contracts-payments.mdx
03:38:35.349 Error evaluating Node.js code
03:38:35.349 419:18: Unexpected character 4 (U+0034) before name, expected a character that can start a name, such as a letter, $, or _
03:38:35.349
03:38:35.349
03:38:35.349 at ignore-listed frames
03:38:35.439  ELIFECYCLE  Command failed with exit code 1.
03:38:35.468 Error: Command "pnpm run build" exited with 1


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel

vercel Bot commented Feb 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hotcrm Ready Ready Preview, Comment Feb 1, 2026 1:51am

Request Review

…ead-management.mdx

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor content documentation for clarity and efficiency Fix MDX syntax errors blocking Vercel deployment Feb 1, 2026
Copilot AI requested a review from hotlong February 1, 2026 01:51
@hotlong
hotlong marked this pull request as ready for review February 1, 2026 02:02
Copilot AI review requested due to automatic review settings February 1, 2026 02:02
@hotlong
hotlong merged commit de43c98 into copilot/refactor-content-docs Feb 1, 2026
5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes MDX syntax errors that caused Vercel deployment failures. The MDX parser was incorrectly interpreting comparison operators (< and >) followed by numbers as JSX tag delimiters, resulting in build errors.

Changes:

  • Escaped < and > comparison operators in numeric expressions using HTML entities (&lt; and &gt;)
  • Fixed 4 instances across 2 documentation files to prevent MDX parsing errors

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
content/docs/features/contracts-payments.mdx Escaped <40 health score threshold and <5% churn rate target in bullet lists
content/docs/features/lead-management.mdx Escaped >70 and <30 lead score thresholds in Mermaid flowchart edge labels

This branch was successfully deployed

1 active deployment
Preview — 6e734d6c Deployed Feb 1, 2026 by vercel[bot]
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 this pull request may close these issues.

3 participants