npm / cli

the package manager for JavaScript
https://docs.npmjs.com/cli/
Other
8.46k stars 3.15k forks source link

[BUG] Windows Arborist Crash on rollbackMoveBackRetiredUnchanged #4448

Open bolshoytoster opened 2 years ago

bolshoytoster commented 2 years ago

Is there an existing issue for this?

This issue exists in the latest npm version

Current Behavior

npm install can crash when realFolders.get(retireFolder) returns undefined in the following code:

https://github.com/npm/cli/blob/dd63e21a0e192f5a7e797d6c89595fd09dbfd7b9/workspaces/arborist/lib/arborist/reify.js#L1065-L1078

Also see log ~line 3459.

Expected Behavior

It shouldn't crash.

Steps To Reproduce

I'm not entirely sure, since I haven't experienced this error. This person has though.

Environment

fritzy commented 2 years ago

I don't have a Windows machine to reproduce this, but it looks like the repo https://github.com/HashLips/hashlips_art_engine might be a good place to try.

fritzy commented 2 years ago

"it sounds like there's a mismatch between this[_retiredPaths] and this[_retiredUnchanged], notably there's this debug block" https://github.com/npm/cli/blob/release-next/workspaces/arborist/lib/arborist/reify.js#L1012-L1024 — @nlf probably