[WIP] Fix Vercel build issues in project#250
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot stopped work on behalf of
hotlong due to an error
January 28, 2026 10:34
Contributor
There was a problem hiding this comment.
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
exportsfield with TypeScript types and import paths following Node.js conventions - Updated
mainandmodulefields 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Vercel Build Failure ✅
Root Cause: The
@object-ui/coreand@object-ui/reactpackages were missing properexportsconfiguration in their package.json files, causing Vite/Rollup to fail during the Storybook build on Vercel.Solution: Added ES module configuration to both packages:
"type": "module"to explicitly declare packages as ES modulesexportsfield with TypeScript types and import pathsmainandmodulefields to use relative pathsVerification:
"type": "module"to@object-ui/corepackage.jsonexportsfield to@object-ui/corepackage.json"type": "module"to@object-ui/reactpackage.jsonexportsfield to@object-ui/reactpackage.jsonBuild 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.yaml9 which may be generated by pnpm@9.x or pnpm@10.x18: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.