Skip to content

[BUG] the --long command is not giving expected results #2724

@PhilipAbed

Description

@PhilipAbed

Current Behavior:

im trying to run these flags:
C:\tests\projects\npm\npm7LsSS>npm ls --all --json --long
`npm ERR! Cannot destructure property 'dependencies' of 'node.package' as it is undefined.
{
"error": {
"code": null,
"summary": "Cannot destructure property 'dependencies' of 'node.package' as it is undefined.",
"detail": ""
}
}

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\PhilipAbed\AppData\Local\npm-cache_logs\2021-02-18T15_01_37_387Z-debug.log`

  1. the --long --json --all parameters were giving me "_deduped" field in the json result.. now it doesnt!
  2. the error you see above is shown differently without the --long flag

Expected Behavior:

on the same project im running npm ls --all --json
without --long

im gettting tree + error stream:

npm ERR! code ELSPROBLEMS
npm ERR! missing: node-sass@^4.0.0, required by [email protected]
npm ERR! missing: sass@^1.3.0, required by [email protected]
{
  "error": {
    "code": "ELSPROBLEMS",
    "summary": "missing: node-sass@^4.0.0, required by [email protected]\r\nmissing: sass@^1.3.0, required by [email protected]",
    "detail": ""
  }
}

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\PhilipAbed\AppData\Local\npm-cache\_logs\2021-02-18T15_01_23_184Z-debug.log

Steps To Reproduce:

install any dependency using npm install [package]
delete it manually from node_modules
run "npm ls --all --json --long"

Environment:

  • OS: windows
  • Node: 1.15.7
  • npm: 7.5.1

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 1high priority issueRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions