You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[curation audit] jf ca with --working-dirs on npm workspace project fails with ENOWORKSPACES #892
The project is an npm monorepo that utilises workspaces in the root package.json.
I am trying to run curation audit for a specific workspace directory using the --working-dirs option (both relative and absolute paths have been tested).
Setup / Environment
Project type: npm monorepo with root workspaces
Node.js version: 22.14.0
Npm version: 10.9.2
Workspace configuration in project's root package.json:
JFrog CLI: reproducible on 2.71.4 (CI), also observed on newer local CLI (2.103.0)
Registry setup: Artifactory npm virtual repo via jf npm-config
Describe the bug
When running jf curation-audit (jf ca) with --working-dirs in an npm workspace monorepo, dependency resolution fails with npm workspace errors, even when targeting a specific workspace directory.
# relative
jf ca --working-dirs=containers/backend
# absolute
jf ca --working-dirs=/absolute/path/to/repo/containers/backend
# multiple directories
jf ca --working-dirs="/abs/.../containers/backend,/abs/.../containers/frontend,/abs/.../containers/cms,/abs/.../containers/jobs"
Current behavior
Failure: ENOWORKSPACES jf ca --working-dirs="/abs/.../containers/backend,/abs/.../containers/frontend,/abs/.../containers/cms,/abs/.../containers/jobs"
fails during npm dependency resolution with:
npm error code ENOWORKSPACES
npm error This command does not support workspaces.
Reproduction steps
Use an npm project with root workspaces.
Configure JFrog CLI and npm resolver (jf config add, jf npm-config).
Run: jf ca --working-dirs=containers/backend
or jf ca --working-dirs=/absolute/path/to/containers/backend
Observe npm failure: ENOWORKSPACES: This command does not support workspaces.
Expected behavior
jf ca --working-dirs=<workspace-path> should audit the specified workspace directory without triggering npm ENOWORKSPACES errors.
JFrog CLI version
2.103.0
Operating system type and version
Linux 6.17.0-22-generic (Ubuntu 24.04.4 LTS)
Additional observation that may help triage:
In my environment, the ENOWORKSPACES failure goes away when I run jf ca with --run-nativeand force npm to a version < 9.2 (for example, npm 9.1.2).
With npm 9.1.2 + --run-native, the curation audit works. With my project’s current npm version (10.9.2), I hit the workspace-related failure path.
So this appears to be related to npm version compatibility/invocation behaviour in workspace mode.
I traced this into the curation implementation in jfrog-cli-security. In the --run-native path, jf curation-audit reads npm config with npm config get registry; when that runs from a workspace package directory, npm 10 can infer workspace mode and fail with ENOWORKSPACES.
Local repro matched the issue shape: npx npm@10.9.2 config get registry failed from a workspace package directory, while adding --workspaces=false succeeded. The PR adds that flag to the native npm config reads and includes a regression test.
Implemented with Codex assistance; I manually checked the source path and verification before posting.
Activity
omribz156 commentedon May 25, 2026
I traced this into the curation implementation in
jfrog-cli-security. In the--run-nativepath,jf curation-auditreads npm config withnpm config get registry; when that runs from a workspace package directory, npm 10 can infer workspace mode and fail withENOWORKSPACES.I opened a focused fix here: #762
Local repro matched the issue shape:
npx npm@10.9.2 config get registryfailed from a workspace package directory, while adding--workspaces=falsesucceeded. The PR adds that flag to the native npm config reads and includes a regression test.Implemented with Codex assistance; I manually checked the source path and verification before posting.