Skip to content

Fix CI Build Failure - Build Ordering and Package Export Issues#80

Merged
hotlong merged 2 commits intocopilot/update-action-run-parametersfrom
copilot/update-action-run-job
Jan 15, 2026
Merged

Fix CI Build Failure - Build Ordering and Package Export Issues#80
hotlong merged 2 commits intocopilot/update-action-run-parametersfrom
copilot/update-action-run-job

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 15, 2026

Fix CI Build Failure - Build Ordering and Package Export Issues

Problem: The CI build fails because pnpm -r build runs all workspace builds in parallel, causing the designer-modes example to fail when it tries to build before @object-ui/components is ready.

Root Causes:

  1. The error Failed to resolve entry for package "@object-ui/components" occurs because the components package hasn't been built yet (no dist/ directory) when the example starts building
  2. The @object-ui/components package.json had incorrect export paths that didn't match the vite build output files

Solution Implemented:

  • Understand the issue and root cause
  • Fix the build script to ensure proper dependency ordering
    • Chosen: Build packages first, then examples (Option B) - most efficient for CI
    • Modified root package.json build script: pnpm --filter './packages/*' -r build && pnpm --filter './examples/*' -r build
  • Fix @object-ui/components package.json exports to match vite output
    • Changed module from dist/index.mjs to dist/index.js
    • Changed main from dist/index.umd.js to dist/index.umd.cjs
    • Updated exports section to match
  • Test the build locally to ensure it works
  • Verify full build completes successfully

Changes Made

1. Root package.json

  • Updated build script to enforce proper build order: packages before examples
  • Prevents parallel build race conditions

2. packages/components/package.json

  • Fixed module field: dist/index.mjsdist/index.js
  • Fixed main field: dist/index.umd.jsdist/index.umd.cjs
  • Updated exports section to match actual vite output

Testing

  • ✅ Full monorepo build completes successfully
  • ✅ All 11 packages build without errors
  • ✅ Both example applications (designer-modes and prototype) build successfully
  • ✅ Package resolution errors resolved

The changes are minimal and surgical, fixing only what's necessary to resolve the CI build failure while maintaining the existing architecture and build system.

Original prompt

引用: https://github.com/objectstack-ai/objectui/actions/runs/21026372532/job/60451949849#step:6:1


💡 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.

@hotlong
Copy link
Copy Markdown
Contributor

hotlong commented Jan 15, 2026

@copilot fix

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 15, 2026

@copilot fix

Fixed! The CI build issue has been resolved with two changes:

  1. Build ordering: Modified the build script to build packages first, then examples (pnpm --filter './packages/*' -r build && pnpm --filter './examples/*' -r build)
  2. Package exports: Fixed @object-ui/components/package.json to match vite's actual output files (index.js and index.umd.cjs instead of index.mjs and index.umd.js)

The full monorepo build now completes successfully. Commit: 2ee2655

Copilot AI changed the title [WIP] Update action run job settings Fix CI Build Failure - Build Ordering and Package Export Issues Jan 15, 2026
Copilot AI requested a review from hotlong January 15, 2026 10:08
@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks passed!

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

@hotlong hotlong marked this pull request as ready for review January 15, 2026 10:14
@hotlong hotlong merged commit 2035c8c into copilot/update-action-run-parameters Jan 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants