Skip to content

cli: @stackbilt/cli@0.10.0 unpublishable — workspace:^ protocol leaks into npm tarball #131

@stackbilt-admin

Description

@stackbilt-admin

Problem

`@stackbilt/cli@0.10.0` on npm can't be installed from any project outside the charter monorepo:

```
$ npm install --save-dev @stackbilt/cli@0.10.0
npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "workspace:": workspace:^
```

The published tarball carries `workspace:^` protocol refs for one or more monorepo-internal dependencies. This protocol only resolves inside the Charter monorepo (via pnpm/yarn workspace resolution); npm in a consumer project throws immediately.

Impact

Any downstream repo that tries to pin `@stackbilt/cli` at 0.10.x fails to install. Discovered while unbreaking CI on `Stackbilt-dev/aegis-oss` — workaround was to pin to `^0.9.2` instead.

Expected

Publish pipeline should rewrite `workspace:^` → concrete version (`^x.y.z`) during `npm publish`. pnpm does this automatically when publishing from a workspace; yarn has `--out` + workspace hoisting. npm itself does not rewrite workspace protocol, so if the monorepo uses npm workspaces, the publish step needs an explicit rewrite.

Repro

```
mkdir /tmp/chartertest && cd /tmp/chartertest
npm init -y
npm install --save-dev @stackbilt/cli@0.10.0 # fails
npm install --save-dev @stackbilt/cli@0.9.2 # succeeds
```

Versions affected

  • `0.10.0` — broken
  • `≤ 0.9.2` — installs cleanly (verified 0.9.0, 0.9.2)

Suggested fix

  1. Identify which internal dep was pulled in with `workspace:^` (likely a `@stackbilt/*` sibling package)
  2. Either:
    • (a) Rewrite on publish — use pnpm publish from the monorepo OR add an npm-publish prepare step that substitutes concrete versions
    • (b) Move the affected dep into the cli bin bundle instead of declaring as a dep
  3. Publish 0.10.1 with the fix
  4. Consider deprecating 0.10.0 on npm: `npm deprecate @stackbilt/cli@0.10.0 "unpublished due to workspace protocol — upgrade to 0.10.1+"`

Context

Needed to pin to 0.9.2 in `Stackbilt-dev/aegis-oss` PR #36 to unblock Charter CI. See the PR description for the downstream workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions