NPM Blob Store

Hi,

I notice a weird behavior on the blob store count.

Why does the blob store seem to be adding a lot (few hundred/thousand) component each time I run npm i even though I only added/upgrade a couple of the package. Before doing that, I did a npm cache clear -f on the machine that is hosting Nexus OSS.

I also tested that if I did not do a npm cache clear -f command, it will only added the delta number of package to the blob store count.

Is there any explanation for this behavior?

Thanks.

if you examine the “.properties” files associated with the blob files you can see what the file paths are. I’m guessing they are npm metadata, so paths like “/jquery”. The npm metadata on the registry changes frequently.

Hi @rseddon,

I don’t quite get what you meant.

What kind of metadata are you referring to? As I’m not exactly sure how that work, please do explain in more details.

If I am using the same package.json, then add only one new package and then run npm i while all the existing package are the same. Isn’t the metadata for the existing packages the same since the version are not changed.

My concern is that if each time I delete my local npm cache and then pull the npm packages and it adds a few hundred/thousand to my blob store, it is adding up to take quite a bit of storage space. I don’t think I see the same behavior for mvn packages. I have deleted my mvn/gradle cache, and re-pull all the dependencies but my blob store for mvn does not increase if my mvn/gradle file doesn’t change.

Thanks.

Here’s a sample.

Before I pull the updated package.json. Blob count is 14551.

After I pulled, blob count becomes 15226. That’s 675 blobs count delta.

And I only updated a couple of packages.

This time I only deleted node_modules directory, and package-lock.json file before I run npm i. I did not run npm cache clear -f.

It’s taking too much space, any explanation for this? Or how do I prevent this from happening?

Hi,

Anyone can help to provide the explanation for this?

Thanks!