Skip to content

fix(ci): use npm install instead of npm ci in publish workflow - #8

Merged
fengyat merged 1 commit into
mainfrom
fix/ci-use-npm-install
May 26, 2026
Merged

fix(ci): use npm install instead of npm ci in publish workflow#8
fengyat merged 1 commit into
mainfrom
fix/ci-use-npm-install

Conversation

@fengyat

@fengyat fengyat commented May 26, 2026

Copy link
Copy Markdown
Member

Why

The v1.1.4 tag push from a few minutes ago failed CI at the Install dependencies step:

npm error The \npm ci` command can only install with an existing package-lock.json or npm-shrinkwrap.json`

Failed run: https://github.com/Continuum-AI-Corp/orcarouter-mcp-server/actions/runs/26441777758

`npm ci` requires a `package-lock.json`. This repo uses bun as primary package manager and only commits `bun.lock` — no `package-lock.json`. PR #3 originally copied `npm ci` from the official MCP Registry docs example, but that example assumes an npm-managed project.

Fix

Replace `npm ci` with `npm install --no-audit --no-fund`. Same pattern as our Dockerfile (merged in #5), which has been working against the same `package.json` with no issues.

Trade-off

  • ✅ Build now works without a second lockfile
  • ⚠️ Transitive dep versions aren't pinned in CI. We accept this because:
    • First-level deps are pinned to caret ranges in `package.json` that have been stable across releases
    • tsup bundles everything into a single `dist/index.js`, so transitive shape doesn't leak into the published artifact
    • Tag-gated runs are infrequent

If pinning becomes important, a future PR can add `package-lock.json` (committed alongside `bun.lock`) and switch back to `npm ci`. Not needed today.

Post-merge: re-tag v1.1.4

The existing `v1.1.4` tag points at the pre-fix commit, so its workflow run can't pick up the fix. After this PR merges:

```bash
git tag -d v1.1.4
git push origin :v1.1.4 # delete remote tag
git tag v1.1.4 # retag at new HEAD on main
git push origin v1.1.4 # retrigger publish workflow
```

No external systems have picked up the broken v1.1.4 yet — `npm view @orcarouter/mcp version` still shows 1.1.3, MCP Registry still has 1.1.3 active. Tag rewrite is safe.

Test plan

  • YAML parses
  • After merge + re-tag, watch the new workflow run succeed at the npm publish step

`npm ci` requires a package-lock.json. This repo uses bun as its
primary package manager and only commits bun.lock, so the v1.1.4 tag
push triggered a CI failure at the Install dependencies step:

    npm error The `npm ci` command can only install with an existing
    package-lock.json or npm-shrinkwrap.json

PR #3 originally chose `npm ci` from the official MCP Registry docs
example — that example assumes an npm-managed project. Our Dockerfile
(merged in #5) already uses `npm install --no-audit --no-fund` against
the same package.json with no issues; this commit aligns the publish
workflow with that pattern.

We accept the trade-off of non-pinned transitive deps in CI: deps are
pinned to caret ranges in package.json that have been stable across
releases, the build is bundled by tsup so transitive shape doesn't
leak into the published artifact, and tag-gated runs are infrequent
enough that drift detection is moot.

After this merges, the existing v1.1.4 tag needs to be re-pointed at
the new commit (delete + recreate) to retrigger publish — there is no
v1.1.4 on npm or MCP Registry yet, since the failed run aborted before
either publish step.
@fengyat
fengyat merged commit 6630091 into main May 26, 2026
1 check passed
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.

1 participant