Skip to content

[WIP] Fix Vercel build error during pre-rendering#140

Merged
huangyiirene merged 2 commits intomainfrom
copilot/fix-vercel-build-error
Jan 21, 2026
Merged

[WIP] Fix Vercel build error during pre-rendering#140
huangyiirene merged 2 commits intomainfrom
copilot/fix-vercel-build-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 21, 2026

Fix Vercel Build Errors

Issues Identified:

  1. Slider TypeError: e.values.map is not a function when prerendering /docs/components/form/slider

    • The slider.mdx demo passes defaultValue: 50 as a number
    • But SliderSchema and the Slider component expect defaultValue as number[] (array)
  2. Icon "home" not found: Icon "home" (lookup: "Home") not found in lucide-react

    • The icons object in lucide-react has House but not Home
    • "Home" was renamed to "House" in lucide-react's icons object

Changes Made:

  • Identify the root causes of both errors
  • Fix slider.mdx to pass defaultValue as an array [50] instead of 50
  • Fix slider renderer to handle both number and array types for backward compatibility
  • Add icon name mapping in icon renderer to map "Home" -> "House"
  • Test the build locally to ensure both issues are resolved
  • Add documentation comments for maintainability
  • Run security checks
Original prompt

fix vercel 01:08:15.462 [MDX] generated files in 26.423321999999985ms
01:08:15.470 ▲ Next.js 16.1.4 (Turbopack)
01:08:15.470
01:08:15.503 Creating an optimized production build ...
01:08:33.574 ✓ Compiled successfully in 17.7s
01:08:33.575 Running TypeScript ...
01:08:37.069 Collecting page data using 3 workers ...
01:08:37.867 Generating static pages using 3 workers (0/90) ...
01:08:38.758 Icon "home" (lookup: "Home") not found in lucide-react
01:08:38.926 Generating static pages using 3 workers (22/90)
01:08:39.447 Error occurred prerendering page "/docs/components/form/slider". Read more: https://nextjs.org/docs/messages/prerender-error
01:08:39.451 TypeError: e.values.map is not a function
01:08:39.451 at (.next/server/chunks/ssr/3a53ad4a..js:80:58216) {
01:08:39.451 digest: '989413814'
01:08:39.451 }
01:08:39.451 Export encountered an error on /docs/[[...slug]]/page: /docs/components/form/slider, exiting the build.
01:08:39.493 ⨯ Next.js build worker exited with code: 1 and signal: null
01:08:39.602  ELIFECYCLE  Command failed with exit code 1.
01:08:39.626 Error: Command "pnpm --filter '../../packages/*' -r build && pnpm build" exited with 1


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 21, 2026

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

Project Deployment Review Updated (UTC)
objectui-docs Error Error Jan 21, 2026 5:23pm
objectui-site Ready Ready Preview, Comment Jan 21, 2026 5:23pm

Request Review

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
@vercel vercel Bot temporarily deployed to Preview – objectui-docs January 21, 2026 17:22 Inactive
@huangyiirene huangyiirene marked this pull request as ready for review January 21, 2026 17:23
@github-actions github-actions Bot added documentation Improvements or additions to documentation package: components labels Jan 21, 2026
@huangyiirene huangyiirene merged commit c17aab1 into main Jan 21, 2026
11 of 12 checks passed
Copilot AI requested a review from huangyiirene January 21, 2026 17:25
Copilot stopped work on behalf of huangyiirene due to an error January 21, 2026 17:25
@github-actions
Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Package Size Gzipped
components (index.js) 1548.04KB 364.64KB
core (index.js) 0.53KB 0.28KB
data-objectql (ObjectQLDataSource.js) 11.05KB 2.64KB
data-objectql (hooks.js) 5.62KB 1.43KB
data-objectql (index.js) 0.62KB 0.36KB
designer (index.js) 1.46KB 0.51KB
plugin-charts (AdvancedChartImpl-DazADGz5.js) 74.89KB 15.82KB
plugin-charts (BarChart-CRc8MAtI.js) 551.60KB 127.51KB
plugin-charts (ChartImpl-DVw_7KEd.js) 3.17KB 1.10KB
plugin-charts (index-CdgY2AuM.js) 12.39KB 3.83KB
plugin-charts (index.js) 0.21KB 0.16KB
plugin-editor (MonacoImpl-B7ZgZJJG.js) 18.15KB 5.59KB
plugin-editor (index-Dl3HAAqu.js) 10.07KB 3.31KB
plugin-editor (index.js) 0.19KB 0.15KB
plugin-kanban (KanbanImpl-CUWM-JC-.js) 76.50KB 20.46KB
plugin-kanban (index-BV3FWhCb.js) 11.86KB 3.67KB
plugin-kanban (index.js) 0.18KB 0.15KB
plugin-markdown (MarkdownImpl-BRkYjVWf.js) 256.79KB 64.50KB
plugin-markdown (index-D_CdfEXQ.js) 9.59KB 3.16KB
plugin-markdown (index.js) 0.19KB 0.15KB
react (SchemaRenderer.js) 1.44KB 0.73KB
react (index.js) 0.32KB 0.23KB
react (index.test.js) 0.34KB 0.26KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 0.20KB 0.18KB
types (base.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data.js) 0.20KB 0.18KB
types (disclosure.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (index.js) 0.34KB 0.25KB
types (layout.js) 0.20KB 0.18KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (registry.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks passed!

  • ✅ Type check passed
  • ✅ Tests passed
  • ✅ Lint check completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation package: components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants