Client & CLI

Package linking

How to wire @owdproject/* dependencies with npm, pnpm workspace, or Git — and avoid common install failures.

OWD is a federation of packages: core and kits live in the client monorepo; themes and apps often live in separate Git repositories; engine modules such as @owdproject/module-fs are optional npm packages, not vendored inside packages/ anymore.

Choosing the wrong dependency specifier is the most common source of pnpm install failures during local development. This page explains the three linking models and when to use each.

The three linking models

1. npm registry (semver)

{
  "dependencies": {
    "@owdproject/core": "^3.3.0",
    "@owdproject/theme-nova": "^0.0.2"
  }
}

Use when:

  • You scaffolded with npm create owd or consume published packages only.
  • You run CI or production builds without a local checkout of core.
  • A theme playground is a standalone repo and you want reproducible installs.

Pros: semver, lockfile stability, no monorepo required.

Cons: you must publish (or wait for) a core release before themes can declare new APIs; patch locally with pnpm patch or temporary overrides if you are blocked.


2. workspace:* (pnpm monorepo)

{
  "devDependencies": {
    "@owdproject/core": "workspace:*"
  }
}

Use when:

  • The package physically exists under a path matched by pnpm-workspace.yaml (typically packages/*, themes/*, apps/*, desktop/).
  • You develop core + desktop + kits together in the official client repo.
  • A theme or app folder is cloned inside themes/my-theme or apps/my-app and listed in the workspace.

Pros: instant feedback — edit core source, reload desktop, no publish step.

Cons: only resolves packages that are in the workspace. If package.json says "@owdproject/module-fs": "workspace:*" but there is no packages/module-fs/ (or cloned module) in the tree, pnpm fails with:

ERR_PNPM_WORKSPACE_PKG_NOT_FOUND
… is in the dependencies but no package named "@owdproject/module-fs" is present in the workspace

That error means: switch to npm semver, add the package via desktop add module-fs --dev, or remove the dependency if the feature is optional.


3. Git URL (forks, unreleased branches)

{
  "dependencies": {
    "@owdproject/theme-gnome": "git+https://github.com/owdproject/theme-gnome.git#main"
  }
}

Use when:

  • You need a fix that is merged on GitHub but not yet on npm.
  • You maintain a fork (--from your-user in the CLI).
  • You pin a known-good commit for a demo:
"git+https://github.com/owdproject/client.git#89f2e6b"

Pros: works outside the monorepo; good for cross-repo PR review.

Cons: slower installs; you must track commit SHAs for reproducibility; some tooling assumes semver in peerDependencies checks.


Decision matrix

You are…CoreTheme / appmodule-fs / persistence
Client monorepo contributorworkspace:*clone under themes/*workspace:*npm ^0.0.x or desktop add … --dev
Theme author (separate repo)npm ^3.3.0 peernpm in playground only if you test explorer
App author (separate repo)npm peernpm theme in playgroundoptional npm in playground
End user / template projectnpmnpmnpm via desktop add

External engine modules

These packages are not part of the client packages/ tree (by design):

PackageRole
@owdproject/module-fsZenFS virtual filesystem runtime
@owdproject/module-persistenceOptional Pinia persistence (IndexedDB)

Kits in the monorepo depend on them as peers or document them as optional:

PackageRole
@owdproject/kit-primevuePrimeVue module, dialog impl, PV explorer chrome
core shell composablesuseDesktopShellIdentity, edge drop, overview, session — see Shell identity
core runtime/explorer/useExplorerStore, DnD, menu model (headless)
kit-theme / kit-fs / kit-explorerDeprecated — use core + kit-primevue

Install modules into your desktop project:

desktop add module-fs
desktop add module-persistence

Then list them in desktop.config.tsmodules. Themes that ship an explorer UI typically check nuxt.options.modules.includes('@owdproject/module-fs') before installing @owdproject/kit-explorer.


Nested Git repositories

The client .gitignore excludes /themes and /apps so you can clone theme/app repos locally without committing them to client. Each clone may have its own .git.

Implications:

  • IDE Git view may show nested repos — normal.
  • workspace:* in a theme package.json only works when that theme folder is inside the client workspace and pnpm sees it as a workspace package.
  • For theme-only work, prefer npm peers on core and semver in the playground; use the client monorepo when you need workspace:* on kits.

After changing dependencies

  1. Run pnpm install at the workspace root (client) or in the theme/app repo.
  2. Run pnpm run prepare:stubs (client) or pnpm run dev:prepare (module) so dist/ stubs exist.
  3. Restart pnpm run dev — Nuxt does not always pick up new module paths without a restart.