Skip to content

[WIP] Fix Vercel build issues in project#250

Merged
hotlong merged 2 commits intomainfrom
copilot/fix-vercel-build-issues
Jan 28, 2026
Merged

[WIP] Fix Vercel build issues in project#250
hotlong merged 2 commits intomainfrom
copilot/fix-vercel-build-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 28, 2026

Fix Vercel Build Failure ✅

Root Cause: The @object-ui/core and @object-ui/react packages were missing proper exports configuration in their package.json files, causing Vite/Rollup to fail during the Storybook build on Vercel.

Solution: Added ES module configuration to both packages:

  • Added "type": "module" to explicitly declare packages as ES modules
  • Added proper exports field with TypeScript types and import paths
  • Updated main and module fields to use relative paths

Verification:

  • Analyze the error and identify the root cause
  • Add "type": "module" to @object-ui/core package.json
  • Add proper exports field to @object-ui/core package.json
  • Add "type": "module" to @object-ui/react package.json
  • Add proper exports field to @object-ui/react package.json
  • Test the build locally - Storybook builds successfully ✅
  • Run code review - No issues found ✅
  • Run security checks - No code changes for CodeQL ✅

Build Status: The Storybook build completes successfully in ~26 seconds.

Original prompt

fix vercel

18:23:17.549 Running build in Washington, D.C., USA (East) – iad1
18:23:17.550 Build machine configuration: 4 cores, 8 GB
18:23:17.708 Cloning github.com/objectstack-ai/objectui (Branch: main, Commit: fac0262)
18:23:17.708 Previous build caches not available.
18:23:18.105 Cloning completed: 397.000ms
18:23:18.675 Running "vercel build"
18:23:19.641 Vercel CLI 50.5.2
18:23:20.242 Detected pnpm-lock.yaml 9 which may be generated by pnpm@9.x or pnpm@10.x
18:23:20.243 Using pnpm@10.x based on project creation date
18:23:20.243 To use pnpm@9.x, manually opt in using corepack (https://vercel.com/docs/deployments/configure-a-build#corepack)
18:23:20.243 Running "install" command: pnpm install...
18:23:20.994 Scope: all 27 workspace projects
18:23:21.202 ../.. | Progress: resolved 1, reused 0, downloaded 0, added 0
18:23:21.376 ../.. | +1420 ++++++++++++++++++++++++++++
18:23:22.204 ../.. | Progress: resolved 1420, reused 0, downloaded 31, added 8
18:23:23.206 ../.. | Progress: resolved 1420, reused 0, downloaded 164, added 68
18:23:24.206 ../.. | Progress: resolved 1420, reused 0, downloaded 213, added 90
18:23:25.206 ../.. | Progress: resolved 1420, reused 0, downloaded 240, added 102
18:23:26.206 ../.. | Progress: resolved 1420, reused 0, downloaded 361, added 154
18:23:27.208 ../.. | Progress: resolved 1420, reused 0, downloaded 527, added 219
18:23:28.208 ../.. | Progress: resolved 1420, reused 0, downloaded 638, added 264
18:23:29.209 ../.. | Progress: resolved 1420, reused 0, downloaded 862, added 382
18:23:30.209 ../.. | Progress: resolved 1420, reused 0, downloaded 1005, added 437
18:23:31.221 ../.. | Progress: resolved 1420, reused 0, downloaded 1124, added 487
18:23:32.233 ../.. | Progress: resolved 1420, reused 0, downloaded 1332, added 567
18:23:33.235 ../.. | Progress: resolved 1420, reused 0, downloaded 1418, added 687
18:23:34.235 ../.. | Progress: resolved 1420, reused 0, downloaded 1418, added 1043
18:23:35.235 ../.. | Progress: resolved 1420, reused 0, downloaded 1418, added 1354
18:23:35.623 ../.. | Progress: resolved 1420, reused 0, downloaded 1418, added 1420, done
18:23:37.252
18:23:37.252 dependencies:
18:23:37.252 + @object-ui/core 0.3.1 <- ../core
18:23:37.252 + @object-ui/react 0.3.1 <- ../react
18:23:37.252 + @object-ui/types 0.3.1 <- ../types
18:23:37.252 + @radix-ui/react-accordion 1.2.12
18:23:37.252 + @radix-ui/react-alert-dialog 1.1.15
18:23:37.252 + @radix-ui/react-aspect-ratio 1.1.8
18:23:37.252 + @radix-ui/react-avatar 1.1.11
18:23:37.252 + @radix-ui/react-checkbox 1.3.3
18:23:37.253 + @radix-ui/react-collapsible 1.1.12
18:23:37.253 + @radix-ui/react-context-menu 2.2.16
18:23:37.253 + @radix-ui/react-dialog 1.1.15
18:23:37.253 + @radix-ui/react-dropdown-menu 2.1.16
18:23:37.253 + @radix-ui/react-hover-card 1.1.15
18:23:37.253 + @radix-ui/react-label 2.1.8
18:23:37.253 + @radix-ui/react-menubar 1.1.16
18:23:37.253 + @radix-ui/react-navigation-menu 1.2.14
18:23:37.253 + @radix-ui/react-popover 1.1.15
18:23:37.253 + @radix-ui/react-progress 1.1.8
18:23:37.253 + @radix-ui/react-radio-group 1.3.8
18:23:37.253 + @radix-ui/react-scroll-area 1.2.10
18:23:37.253 + @radix-ui/react-select 2.2.6
18:23:37.253 + @radix-ui/react-separator 1.1.8
18:23:37.253 + @radix-ui/react-slider 1.3.6
18:23:37.253 + @radix-ui/react-slot 1.2.4
18:23:37.254 + @radix-ui/react-switch 1.2.6
18:23:37.254 + @radix-ui/react-tabs 1.1.13
18:23:37.254 + @radix-ui/react-toast 1.2.15
18:23:37.254 + @radix-ui/react-toggle 1.1.10
18:23:37.254 + @radix-ui/react-toggle-group 1.1.11
18:23:37.254 + @radix-ui/react-tooltip 1.2.8
18:23:37.254 + class-variance-authority 0.7.1
18:23:37.254 + clsx 2.1.1
18:23:37.254 + cmdk 1.1.1
18:23:37.254 + date-fns 4.1.0
18:23:37.254 + embla-carousel-react 8.6.0
18:23:37.254 + input-otp 1.4.2
18:23:37.254 + lucide-react 0.563.0
18:23:37.254 + next-themes 0.4.6
18:23:37.254 + react 19.2.3
18:23:37.254 + react-day-picker 9.13.0
18:23:37.254 + react-dom 19.2.3
18:23:37.254 + react-hook-form 7.71.1
18:23:37.254 + react-resizable-panels 4.5.2
18:23:37.254 + recharts 2.15.4
18:23:37.254 + sonner 2.0.7
18:23:37.254 + tailwind-merge 3.4.0
18:23:37.255 + tailwindcss-animate 1.0.7
18:23:37.255 + vaul 1.1.2
18:23:37.255
18:23:37.255 devDependencies:
18:23:37.255 + @storybook/addon-essentials 8.6.14
18:23:37.255 + @storybook/addon-interactions 8.6.14
18:23:37.255 + @storybook/addon-links 8.6.15
18:2...


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 28, 2026

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

Project Deployment Review Updated (UTC)
objectui Error Error Jan 28, 2026 10:44am
objectui-components Error Error Jan 28, 2026 10:44am
objectui-crm-app Ready Ready Preview, Comment Jan 28, 2026 10:44am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
@hotlong hotlong marked this pull request as ready for review January 28, 2026 10:33
Copilot AI review requested due to automatic review settings January 28, 2026 10:33
@hotlong hotlong merged commit 8ce9942 into main Jan 28, 2026
5 of 7 checks passed
Copilot AI requested a review from hotlong January 28, 2026 10:34
Copilot stopped work on behalf of hotlong due to an error January 28, 2026 10:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 Vercel build failures by adding proper ES module configuration to the @object-ui/core and @object-ui/react packages. The root cause was missing exports field declarations in package.json files, which caused Vite/Rollup to fail during Storybook builds on Vercel.

Changes:

  • Added "type": "module" to explicitly declare packages as ES modules
  • Added proper exports field with TypeScript types and import paths following Node.js conventions
  • Updated main and module fields to use relative paths (with ./ prefix)

Reviewed changes

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

File Description
packages/core/package.json Added ES module configuration with type, exports, and relative path corrections
packages/react/package.json Added ES module configuration with type, exports, and relative path corrections

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