[BUG] npm ls
fails if there are extraneous packages
#2664
Labels
Bug
thing that needs fixing
Priority 1
high priority issue
Release 7.x
work is associated with a specific npm 7 release
Milestone
Current Behavior:
npm ls
fails (non-zero exit code,ELSPROBLEMS
JSON error code) if there are extraneous packages. This is a behavior change from npm v6; see steps to reproduce below.Extraneous packages can happen if
package.json
is deleted, or if npm v6 is used to install packages in an empty directory.This issue matters to me because of the way Etherpad handles plugin packages: They are installed in a separate directory without a
package.json
, andnpm ls
is expected to successfully discover them.Expected Behavior:
npm ls
should not fail if there are extraneous packages, or at least there should be an option to not fail due to extraneous packages. Note thatnpm ls
includes extraneous packages in its output, and it marks those packages as extraneous, so extraneous packages do not seem to be a problem worthy of a fatal error fromnpm ls
.Steps To Reproduce:
Environment:
The text was updated successfully, but these errors were encountered: