Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for pnpm dlx command #1605

Open
1 task
prabhu opened this issue Jan 28, 2025 · 2 comments
Open
1 task

Support for pnpm dlx command #1605

prabhu opened this issue Jan 28, 2025 · 2 comments
Labels
good first issue Good for newcomers

Comments

@prabhu
Copy link
Collaborator

prabhu commented Jan 28, 2025

When using the dlx command, our logic to identify the plugins directory isn't working.

❯ corepack pnpm dlx @cyclonedx/cdxgen --help
 WARN  8 deprecated subdependencies found: @npmcli/[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Packages: +436
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 443, reused 430, downloaded 6, added 436, done
cdxgen plugins was not found. Please install with npm install -g @cyclonedx/cdxgen-plugins-bin
cdxgen [command]

The below line needs to be enhanced:

let CDXGEN_PLUGINS_DIR = process.env.CDXGEN_PLUGINS_DIR;

We might need another fix to deal with architecture-specific directories.

The directory naming convention used by dlx is different.

❯ ls -l /Users/prabhu/Library/Caches/pnpm/dlx/xq7ifqwy4f6nns2yc3cew5stea/pkg/node_modules/.pnpm
total 232
drwxr-xr-x@   3 prabhu  staff      96 28 Jan 13:36 @[email protected]
drwxr-xr-x@   3 prabhu  staff      96 28 Jan 13:36 @[email protected]

To research:

  • Check if dlx command supports a locally created package with pnpm pack.
@prabhu prabhu added the good first issue Good for newcomers label Jan 28, 2025
@youhaveme9
Copy link
Contributor

I was not able to reproduce it

~ corepack pnpm dlx @cyclonedx/cdxgen --help
 WARN  8 deprecated subdependencies found: @npmcli/[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Packages: +433
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Downloading @appthreat/[email protected]: 74.07 MB/74.07 MB, done
Progress: resolved 440, reused 342, downloaded 91, added 433, done
Library/Caches/pnpm/dlx/lqtdd6ipvsc3d3qe2mv7zifi2e/19518b38d6c-53a2/node_modules/.pnpm/[email protected]/node_modules/sqlite3: Running install script, done in 482ms
cdxgen [command]

Am I missing something here?

@prabhu
Copy link
Collaborator Author

prabhu commented Feb 18, 2025

export CDXGEN_DEBUG_MODE=debug
corepack pnpm dlx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants