Skip to content

Commit ce33ba8

Browse files
justin808claude
andcommitted
Fix prepack script to use yarn instead of npm
Change the build.prepack script to use 'yarn run build' instead of 'npm run build'. In a yarn workspace, using npm to run scripts that depend on workspace features (like 'yarn workspace react-on-rails run build') causes build failures. This fixes the yalc package publishing failures in CI where the prepack script would fail silently, resulting in packages being published without the built files, leading to downstream errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 02ca90d commit ce33ba8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package-scripts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ scripts:
2626
# 4. If it failed, print an error message (still follow https://docs.npmjs.com/cli/v8/using-npm/scripts#best-practices).
2727
script: >
2828
[ -f packages/react-on-rails/lib/ReactOnRails.full.js ] ||
29-
(npm run build >/dev/null 2>&1 || true) &&
29+
(yarn run build >/dev/null 2>&1 || true) &&
3030
[ -f packages/react-on-rails/lib/ReactOnRails.full.js ] ||
3131
{ echo 'Building react-on-rails seems to have failed!'; }
3232

0 commit comments

Comments
 (0)