Open davidacmoreira-cx opened 3 years ago
confirmed, easy to reproduce this one. thanks for letting us know!
Umm.... I'm pretty sure npm@6 used the actual tree as well?
The output is almost identical between v6 and v7. There is a problem that we print two JSON blobs when there's errors in v7, though, that's a bug.
Pulling my comment over from my PR, since this is the better place to discuss:
@isaacs I've got need to have npm list
behaviour on the virtual tree for audit-app
to backfill information on dependency paths & versions because the new auditing output doesn't have all the information we need for that - using the virtual tree means you don't have to actually be able to successfully install saving a lot of time and pain when using tooling to do mass project auditing.
Additionally, there is the sort-of bug/inconsistency with the output of npm audit
vs npm list
that I mentioned in my PR (I tried to make a simple reproduction, but it proved too hard to pin down to just a few dependencies since npm would keep trying to pull in patched versions of ini
) that this would help explain.
Would implementing a new flag (i.e --virtual
) be on the table? I'd expect from what I was when exploring this issue originally, it shouldn't be too hard to implement (just a matter of having the flag and then changing the line from my PR to be if: loadVirtual; else: loadActual
.
Current Behavior:
The command
npm ls --all
does not list the dependency tree, without _nodemodules folder. This command is failing to list the dependency tree with only the package-lock.json file, using npm v7.Expected Behavior:
Using npm v6, the
npm ls
command is working as expected, by listing the dependency tree, with only the package.json and package-lock.json files present, and without _nodemodules folder.Steps To Reproduce:
npm ls --all --json
or
npm install
npm ls --all --json
Environment:
or