Skip to content

fix(setup): run npm commands from repo root after workspace promotion#131

Merged
CoderCoco merged 1 commit into
mainfrom
worktree-claude+issue-130-fix-setup-sh-npm-root
May 10, 2026
Merged

fix(setup): run npm commands from repo root after workspace promotion#131
CoderCoco merged 1 commit into
mainfrom
worktree-claude+issue-130-fix-setup-sh-npm-root

Conversation

@CoderCoco
Copy link
Copy Markdown
Owner

Closes #130

Summary

  • bootstrap() and deploy() in setup.sh were both cd-ing into app/ and calling npm run build:lambdas, left over from before PR build(workspaces): promote repo root to npm workspace root #53 promoted the npm workspace root from app/ to the repo root
  • Changed cd "$SCRIPT_DIR/app"cd "$SCRIPT_DIR" in both functions so npm ci runs from the workspace root and correctly hoists all dependencies
  • Changed npm run build:lambdasnpm run app:build:lambdas to match the root-level script alias
  • Fixed the stale "next steps" dev command in the bootstrap output (cd app && npm run devnpm run app:dev)
  • Removed app/package-lock.json — orphaned lockfile from before the workspace root promotion that could confuse npm

Test plan

  • Run ./setup.sh on a clean clone — confirm npm ci succeeds at the repo root and Lambda bundles build without TS2307 errors
  • Run ./setup.sh deploy — confirm npm run app:build:lambdas runs successfully from the repo root
  • Confirm app/package-lock.json is gone and npm ci at repo root still resolves all workspace deps correctly

setup.sh bootstrap() and deploy() were still cd-ing into app/ and
calling `npm run build:lambdas` — both wrong after PR #53 promoted
the workspace root from app/ to the repo root.

- Change `cd "$SCRIPT_DIR/app"` → `cd "$SCRIPT_DIR"` in both functions
- Rename `build:lambdas` → `app:build:lambdas` to match the root
  workspace script name
- Remove app/package-lock.json (stale lockfile, predates the
  workspace-root promotion; the authoritative one is at repo root)

Closes #130

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 10, 2026 02:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the setup helper to run npm installs/builds from the repo root (the current npm workspace root), avoiding dependency hoisting issues and aligning script invocations with the root-level aliases.

Changes:

  • Run npm ci and Lambda builds from $SCRIPT_DIR (repo root) instead of $SCRIPT_DIR/app.
  • Switch Lambda build invocation to npm run app:build:lambdas and update the printed dev “next steps” command to npm run app:dev.
  • Remove the stale app/package-lock.json to prevent installs from targeting an orphaned lockfile.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
setup.sh Runs installs/builds from the workspace root and updates script/printed commands to root-level aliases.
app/package-lock.json Removes an orphaned lockfile that could cause npm ci to run in the wrong directory.

@CoderCoco CoderCoco merged commit 6ff0d8d into main May 10, 2026
12 checks passed
@CoderCoco CoderCoco deleted the worktree-claude+issue-130-fix-setup-sh-npm-root branch May 10, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: setup.sh installs deps from app/ after workspace root was promoted to repo root (#53)

2 participants