fix(ci): use root npm install for workspace monorepo#34
Conversation
…update Bumps the npm_and_yarn group with 1 update in the / directory: [next](https://github.com/vercel/next.js). Bumps the npm_and_yarn group with 1 update in the /apps/web directory: [next](https://github.com/vercel/next.js). Updates `next` from 15.5.14 to 15.5.15 - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](vercel/next.js@v15.5.14...v15.5.15) Updates `next` from 15.5.14 to 15.5.15 - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](vercel/next.js@v15.5.14...v15.5.15) --- updated-dependencies: - dependency-name: next dependency-version: 15.5.15 dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: next dependency-version: 15.5.15 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
…ns dependency state This repository uses a root npm workspace lockfile, so installing from `packages/cli` in CI bypasses the dependency graph that npm expects. Running `npm ci` at the repo root keeps install behavior aligned with the workspace layout while preserving the existing CLI-specific lint and test commands. Constraint: npm workspace dependencies are resolved by the root package-lock.json Rejected: Keep `npm ci --prefix packages/cli` and add a package-local lockfile | would duplicate workspace dependency state and fight npm workspace conventions Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep root-level install steps in CI unless the monorepo stops using a shared workspace lockfile Tested: YAML parse of `.github/workflows/ci.yml`; diff review confirming only the two install commands changed Not-tested: End-to-end GitHub Actions execution after push
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🤖 Augment PR SummarySummary: Updates CI to install dependencies correctly for an npm workspaces monorepo by running Changes:
Technical Notes: Root installs align with the repo’s 🤖 Was this summary useful? React with 👍 or 👎 |
| }, | ||
| "dependencies": { | ||
| "next": "^15.2.0", | ||
| "next": "^15.5.15", |
There was a problem hiding this comment.
apps/web/package.json:12 — The PR title/description reads like a CI-only change, but this also bumps next (and updates lockfiles). If intentional, consider updating the PR description/title (or splitting) so reviewers don’t miss the dependency upgrade.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| cache: npm | ||
| - name: Install CLI dependencies | ||
| run: npm ci --prefix packages/cli | ||
| run: npm ci |
There was a problem hiding this comment.
.github/workflows/ci.yml:23-24 — This step is named “Install CLI dependencies” but now runs npm ci at the repo root (installing all workspaces); consider renaming to avoid confusion (also applies to the test job).
Severity: low
Other Locations
.github/workflows/ci.yml:39
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Summary
The CI workflow was running
npm ci --prefix packages/cli, which fails because this is an npm workspace monorepo — the rootpackage-lock.jsonmanages all workspace dependencies. Runningnpm ciwith--prefixskips the root lock file and can't find dependencies likeposthog-nodeand@posthog/core.Changes
.github/workflows/ci.yml: Changednpm ci --prefix packages/cli→npm ciin bothlintandtestjobspackages/clivia--prefixWhy
This unblocks PR #33 (dependabot next.js security bump) and fixes CI for all future PRs.
Verification
.github/workflows/ci.ymlonlyPull Request opened by Augment Code with guidance from the PR author