Skip to content

Commit ef7e98c

Browse files
justin808claude
andcommitted
Fix prepare scripts to avoid yarn deadlock during install
## Problem The prepare scripts were calling `yarn run build` which caused a deadlock when triggered during `yarn install --frozen-lockfile`. This made the CI test job hang indefinitely. ## Root Cause When `yarn install` executes the prepare lifecycle hook, it's still holding internal locks. Calling `yarn run` from within this hook tries to acquire the same locks, resulting in a deadlock. ## Solution Replace `yarn run build` with direct command execution in all prepare scripts: - `yarn run build` → `(rm -rf ./lib && tsc ...)` This avoids the yarn deadlock while maintaining the same build behavior. ## Testing - ✅ Clean install works: `rm -rf node_modules && yarn install --frozen-lockfile` - ✅ Jest CI tests no longer hang: `yarn workspace react-on-rails-pro-node-renderer run ci` - ✅ Build artifacts created correctly - ✅ YALC publish works as expected ## Files Changed - packages/react-on-rails/package.json - packages/react-on-rails-pro/package.json - packages/react-on-rails-pro-node-renderer/package.json 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 0c2f96c commit ef7e98c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/react-on-rails-pro-node-renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"developing": "nps node-renderer.debug",
8282
"test": "jest tests",
8383
"type-check": "yarn run tsc --noEmit --noErrorTruncation --project src/tsconfig.json",
84-
"prepare": "[ -f lib/ReactOnRailsProNodeRenderer.js ] || yarn run build",
84+
"prepare": "[ -f lib/ReactOnRailsProNodeRenderer.js ] || (rm -rf ./lib && tsc --project src/tsconfig.json)",
8585
"prepublishOnly": "yarn run build",
8686
"yalc:publish": "yalc publish",
8787
"yalc": "yalc"

packages/react-on-rails-pro/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"test:non-rsc": "jest tests --testPathIgnorePatterns=\".*(.rsc.test.).*\"",
1212
"test:rsc": "NODE_CONDITIONS=react-server jest tests/*.rsc.test.*",
1313
"type-check": "yarn run tsc --noEmit --noErrorTruncation",
14-
"prepare": "[ -f lib/ReactOnRails.full.js ] || yarn run build",
14+
"prepare": "[ -f lib/ReactOnRails.full.js ] || (rm -rf ./lib && tsc)",
1515
"prepublishOnly": "yarn run build",
1616
"yalc:publish": "yalc publish",
1717
"yalc": "yalc"

packages/react-on-rails/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"clean": "rm -rf ./lib",
1111
"test": "jest tests",
1212
"type-check": "yarn run tsc --noEmit --noErrorTruncation",
13-
"prepare": "[ -f lib/ReactOnRails.full.js ] || yarn run build",
13+
"prepare": "[ -f lib/ReactOnRails.full.js ] || (rm -rf ./lib && tsc)",
1414
"prepublishOnly": "yarn run build",
1515
"yalc:publish": "yalc publish",
1616
"yalc": "yalc"

0 commit comments

Comments
 (0)