C:\mypath>npx @cyclonedx/cyclonedx-npm --output-file ../artifacts/npmbom.json
DEBUG | options: {"ignoreNpmErrors":false,"packageLockOnly":false,"omit":[],"flattenComponents":false,"specVersion":"1.4","outputFormat":"JSON","outputFile":"../artifacts/npmbom.json","mcType":"application"}
DEBUG | packageFile: C:\mypath\package.json
DEBUG | projectDir: C:\mypath
DEBUG | lockFile: C:\mypath\package-lock.json
DEBUG | command: npx-cli.js usage detected, checking for npm-cli.js ...
INFO | gather dependency tree ...
DEBUG | npm-ls: run C:\Program Files (x86)\nodejs\node.exe with ["--","C:\\Users\\myuser\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js","ls","--json","--all","--long"] in C:\mypath
WARN | npm-ls: STDERR
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
ERROR | npm-ls: errors
{"error":{},"status":1,"signal":null}
Error: npm-ls exited with errors: ??? 1 noSignal
When running on Windows, I get an error because my Node path contains a space:
Maybe related to nodejs/node#7367 (comment)