Fix: Fix error reading matches of null when install dependencies#7588
Fix: Fix error reading matches of null when install dependencies#7588GiveMeSomething wants to merge 2 commits intonpm:latestfrom GiveMeSomething:fix/fix-reading-matches-of-null-when-install-deps
Conversation
|
This looks pretty similar to #7579. Is this a similar root cause? In any event this will needs tests showing how to get into this broken state and show how npm now handles it. |
@wraithgar Sorry for my late response. I think they are related as both errors occur when Further investigation show that the
I think we need to resolve this issue inside
|
Prerequisite
pnpm, creating.pnpminsidenode_modulesWhat
From my inspection,
npm installis throwing error when trying to dedupe dependencies, usingmatches()function fromworkspace/lib/node.jsto check if 2 dependencies are the same (safe to remove if they are the same)Error was thrown when the function try to resolve
targetfrom a dependencies inside.pnpmfolder, which have non-existent path (please see trace log below)Error is thrown at function
workspace/arborist/lib/node.js:1118Trace
this.targetandnode.targetpnpmand ignore.pnpmfolder when build dependencies treeReferences
Related to issue #4367