install: Remove failed non-optional deps from tree
install: Remove failed non-optional deps from tree

This is specifically referring to failures in finding a matching version.

It sounds a little weird, because failing non-optional deps are ordinarily
fatal and would fail out the entire tree, but what this does is ensure that
transitive non-optional deps of an optional dependency get removed from the
tree.  Without this, a failure in one dep of an optional dep would
result in all the other deps of the optional dep still being installed.

Credit: da39a3ee5e6b4b0d3255bfef95601890afd80709@iarna
PR-URL: https://github.com/npm/npm/pull/12775

DaveEmmerson/npm,Volune/npm,DaveEmmerson/npm,Volune/npm,evocateur/npm,chadnickbok/npm,misterbyrne/npm,chadnickbok/npm,misterbyrne/npm,evocateur/npm,Volune/npm,evocateur/npm,chadnickbok/npm,misterbyrne/npm,DaveEmmerson/npm