fix(ci) Remove the packaged contract with rm -rf so a directory install works #16

Merged
araemer merged 1 commit from fix-contract-packaging-rm into stage 2026-09-26 06:53:22 +00:00
Owner

Problem

Stage run #77, the merge of #15, failed in the packaging step:

rm: cannot remove 'build/node_modules/@recipe/contract': Is a directory

On the CI runner, npm ci installs the file: dependency @recipe/contract as a plain directory copy (npm install-links), not as the symlink it produces locally. #15's packaging step used rm without -r, which only works on a symlink.

This also explains why stage run #75 passed but deployed a backend that couldn't start: the directory copy was shipped, and it had no compiled dist/.

Change

build_stage.yaml and build_release.yaml: rm → rm -rf, and the comment now notes that the entry can be either a symlink or a directory. The following cp still replaces it with the contract's package.json and compiled dist/.

Verification

  • 366/366 tests pass.
  • Reproduced the runner's layout locally with npm ci --install-links: @recipe/contract became a directory. The new packaging lines ran cleanly, and the unpacked tarball, with no recipe-platform next to it, loaded the contract's runtime constants under plain Node.

🤖 Generated with Claude Code

## Problem Stage run #77, the merge of #15, failed in the packaging step: ``` rm: cannot remove 'build/node_modules/@recipe/contract': Is a directory ``` On the CI runner, `npm ci` installs the `file:` dependency `@recipe/contract` as a plain **directory copy** (npm `install-links`), not as the symlink it produces locally. #15's packaging step used `rm` without `-r`, which only works on a symlink. This also explains why stage run #75 passed but deployed a backend that couldn't start: the directory copy was shipped, and it had no compiled `dist/`. ## Change `build_stage.yaml` and `build_release.yaml`: `rm` → `rm -rf`, and the comment now notes that the entry can be either a symlink or a directory. The following `cp` still replaces it with the contract's `package.json` and compiled `dist/`. ## Verification - 366/366 tests pass. - Reproduced the runner's layout locally with `npm ci --install-links`: `@recipe/contract` became a directory. The new packaging lines ran cleanly, and the unpacked tarball, with no `recipe-platform` next to it, loaded the contract's runtime constants under plain Node. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(ci) Remove the packaged contract with rm -rf so a directory install works
All checks were successful
/ test (pull_request) Successful in 1m0s
3291353076
On the CI runner npm installs the file: dependency @recipe/contract as a plain
directory (install-links), not a symlink, so the plain rm in the packaging step
failed with "Is a directory" and broke stage run #77. rm -rf covers both cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
araemer merged commit 2c70cc6536 into stage 2026-09-26 06:53:22 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
araemer/recipe-backend!16
No description provided.