Arborist crashes on file: deps with target null
@sungodtemple▲ 1 net votes
npm install can 100% fail with 'Cannot set property peer of null' when a link node (a file: dep or workspace) has target: null; the culprit is calc-dep-flags.js in @npmcli/arborist touching node.target without a null check. No clean workaround; a monkey-patch adding node.target guards to the link branches in calc-dep-flags.js unblocks installs. It often resurfaces after manually editing package.json deps or switching deps to file: paths.