nexu-io/open-design · error · Error

design system backing project publish failed

Error message

design system backing project publish failed

What it means

Thrown during the team-visibility transition when `publishProject` resolves with a result whose `version` is null/undefined. Without a version number the remote Team publication is treated as not authoritative, so the share transition cannot commit and the preparer aborts before persisting visibility locally.

Source

Thrown at apps/daemon/src/design-systems/team-project-share.ts:114

      throw new Error('design system backing project is unavailable');
    }
    const workspaceId = scope.principal.teamId;
    const memberId = scope.principal.memberId;
    const binding = options.getProjectBinding(projectId);
    if (binding?.workspaceId && binding.workspaceId !== workspaceId) {
      throw new Error('design system backing project belongs to another workspace');
    }
    if (binding?.createdByWorkspaceMemberId !== memberId) {
      throw new TeamResourceShareForbiddenError();
    }
    options.onPrepared?.({ resourceId, projectId, scope });
    return {
      projectId,
      transition: async (visibility) => {
        if (visibility === 'team') {
          const published = await options.publishProject(projectId, scope);
          if (published.version == null) {
            throw new Error('design system backing project publish failed');
          }
          try {
            await options.persistVisibility({ projectId, scope, visibility });
          } catch (error) {
            try {
              await options.unpublishProject(projectId, scope);
            } catch (rollbackError) {
              // Remote rollback failed, so the project publication is still
              // Team-authoritative. Retry the local forward projection once;
              // a transient SQLite failure can converge to the original share
              // intent without asking the outer coordinator to make an unsafe
              // assumption about which project state won.
              try {
                await options.persistVisibility({ projectId, scope, visibility });
                return;
              } catch (forwardError) {
                throw compensationError(
                  'share',

View on GitHub (pinned to 5be4028344)

Solutions

  1. Check the publish adapter (`publishProject`) implementation and the remote hub response to confirm a version is assigned.
  2. Retry the share once the remote Team hub is healthy and returns a non-null version.
  3. Verify the publish result contract expects `{ version: number | null }` and that the hub actually mints a version for new publications.
Defensive patterns

Strategy: try-catch

Validate before calling

// Before sharing, verify publish returns a version:
const probe = await publishProject(projectId, scope);
if (probe.version == null) {
  throw new Error('remote hub did not assign a publication version');
}
// only then proceed with the full share

Try / catch

try {
  await linkedShare.share(resourceId, scope);
} catch (err) {
  if (err instanceof Error && /publish failed/.test(err.message)) {
    // retry once the remote Team hub is healthy and returns a version
  }
  throw err;
}

Prevention

When it happens

Trigger: Calling `share` on a linked design system; `publishProject(projectId, scope)` returns `{ version: null }` or `{ version: undefined }`. The remote Team hub did not assign a publication version.

Common situations: The Vela/Team publish adapter returned a malformed result. A remote publish partially succeeded but did not surface a version. A version mismatch between the local projection and the remote hub. An adapter bug or contract drift in the publish return shape.

Related errors


AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12). Data as JSON: /api/errors/ddc86efd7275a9ec. Report an issue: GitHub.