Skip to content

Commit 70a015e

Browse files
justin808claude
andcommitted
Fix CI failures: Build packages before yalc publish
The CI was failing with module resolution errors because packages were being published to yalc before building them. This meant the lib/ directories were empty or stale, causing webpack to fail when trying to import from the published packages. ## Root Cause Workflows were running `yalc publish` immediately after `yarn install`, but before building the TypeScript packages. This published empty/stale lib/ directories to yalc, which caused: - Missing exports errors (./pageLifecycle, ./context, etc.) - webpack build failures in example apps - Integration test failures ## Fix Added `yarn build` step before `yalc publish` in all workflows: - examples.yml: Build all workspace packages before publishing - integration-tests.yml: Build react-on-rails package (2 occurrences) - lint-js-and-ruby.yml: Build react-on-rails package ## Verification The build step compiles TypeScript to JavaScript and populates lib/ with: - All exported modules (context.js, pageLifecycle.js, etc.) - Correct package.json exports definitions - Complete type definitions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent fa76225 commit 70a015e

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.github/workflows/examples.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ jobs:
145145
run: |
146146
yarn install --no-progress --no-emoji ${{ matrix.dependency-level == 'latest' && '--frozen-lockfile' || '' }}
147147
sudo yarn global add yalc
148+
- name: Build packages before yalc publish
149+
# Build all workspace packages (react-on-rails, react-on-rails-pro, react-on-rails-pro-node-renderer)
150+
# This ensures the lib/ directories are populated with compiled JS before yalc publish
151+
run: yarn workspaces run build
148152
- name: yalc publish for react-on-rails
149153
# Use yarn workspace script to publish all workspace packages to yalc
150154
# Runs the "yalc:publish" script defined in each workspace's package.json

.github/workflows/integration-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ jobs:
139139
run: |
140140
yarn install --no-progress --no-emoji ${{ matrix.dependency-level == 'latest' && '--frozen-lockfile' || '' }}
141141
sudo yarn global add yalc
142+
- name: Build react-on-rails package
143+
run: cd packages/react-on-rails && yarn build
142144
- name: yalc publish for react-on-rails
143145
run: cd packages/react-on-rails && yalc publish
144146
- name: yalc add react-on-rails
@@ -237,6 +239,8 @@ jobs:
237239
run: |
238240
yarn install --no-progress --no-emoji ${{ matrix.dependency-level == 'latest' && '--frozen-lockfile' || '' }}
239241
sudo yarn global add yalc
242+
- name: Build react-on-rails package
243+
run: cd packages/react-on-rails && yarn build
240244
- name: yalc publish for react-on-rails
241245
run: cd packages/react-on-rails && yalc publish
242246
- name: yalc add react-on-rails

.github/workflows/lint-js-and-ruby.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ jobs:
118118
run: |
119119
yarn install --no-progress --no-emoji --frozen-lockfile
120120
sudo yarn global add yalc
121+
- name: Build react-on-rails package
122+
run: cd packages/react-on-rails && yarn build
121123
- name: yalc publish for react-on-rails
122124
run: cd packages/react-on-rails && yalc publish
123125
- name: yalc add react-on-rails

0 commit comments

Comments
 (0)