Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Renamed binaries break npm install/update #2602
Seems like binaries that are renamed between package versions spook npm when updating. It reminds me of #1302, which was fixed ages ago.
The error is always triggered by installing version 0.4.46, then updating to 0.4.47:
Also happens with
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Ah, very interesting.
The first time it reads the package.json file, it looks up the directories.bin field, then finds all the bins in there, and sticks them on as literal
It also caches the resulting data object, which is so that it doesn't have to keep reading the same package.json file repeatedly. However, this causes problems, because it's actually a new file, even though it has the same filename!
So, when removing the file, the cache has to be invalidated.