Skip to content

fix: avoid CLI module fallback warning - #172

Open
kadel wants to merge 1 commit into
redhat-developer:mainfrom
kadel:fix/intent-cli-module-discovery
Open

fix: avoid CLI module fallback warning#172
kadel wants to merge 1 commit into
redhat-developer:mainfrom
kadel:fix/intent-cli-module-discovery

Conversation

@kadel

@kadel kadel commented Sep 1, 2026

Copy link
Copy Markdown
Member

What was happening

The auth and actions commands invoked the aggregate backstage-cli binary. That binary discovers CLI modules from the current project's root package.json.

When running through npx outside a Backstage project, no CLI modules were found. Backstage fell back to its built-in modules and printed a deprecation warning. Concurrent stdout and stderr streaming also caused the warning and source-list output to become interleaved.

Before

$ npx @red-hat-developer-hub/cli@2.0.4 actions sources list
No CLI modules found in the project root dependencies. Falling back to the built-in set of modules.
This fallback will be removed in a future release. Please add @backstage/cli-defaults as a devDependency in your root package.json, or install individual @backstage/cli-module-* packages for fine-grainecatalog
scaffolder
d control.

Fix

Invoke the dedicated @backstage/cli-module-actions and @backstage/cli-module-auth binaries directly instead of relying on aggregate CLI module discovery.

Both packages are now explicit runtime dependencies. Output from their binaries continues to be rebranded as rhdh-cli, including names split across streamed chunks.

After

$ rhdh-cli actions sources list
catalog
scaffolder

Verification

  • yarn lint:check
  • yarn tsc
  • yarn build
  • yarn test --runInBand — 9 suites and 31 tests passed

Invoke the dedicated auth and actions CLI modules so npx users do not depend on project-root module discovery.

Signed-off-by: Tomas Kral <tkral@redhat.com>

Assisted-by: Codex
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

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