Skip to content

zai-cli --help fails after clean npm install because js-yaml is missing #17

Description

@MrDiscipline

Reproduction

From a clean npm project:

tmp=$(mktemp -d)
cd "$tmp"
npm init -y >/dev/null
npm install --no-audit --no-fund @zds-ai/cli@0.1.10
./node_modules/.bin/zai-cli --help

Actual behavior

The CLI exits before printing help:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'js-yaml' imported from .../node_modules/@zds-ai/cli/dist/utils/settings-manager.js

Expected behavior

zai-cli --help should print the help text and exit successfully after a clean install.

Root cause

src/utils/settings-manager.ts imports js-yaml, but js-yaml is not listed as a runtime dependency in the published package's package.json. It appears only in the lockfile as a dev/transitive dependency, so consumers do not receive it.

Environment

  • macOS 15.7.2
  • Node v25.8.2
  • npm 11.11.1
  • package: @zds-ai/cli@0.1.10

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